home *** CD-ROM | disk | FTP | other *** search
MacBinary | 1994-09-04 | 32.1 KB | [TEXT/ALFA] |
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: MacBinary
(archive/macBinary).
Confidence | Program | Detection | Match Type | Support
|
---|
10%
| dexvert
| MacBinary (archive/macBinary)
| fallback
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| MacBinary II, inited, Sun Sep 4 16:40:51 1994, modified Sun Sep 4 16:40:51 1994, creator Alpha editor, type ASCII, 29333 bytes "Apple Events" , at 0x7315 3249 bytes resource
| default (weak)
| |
99%
| file
| data
| default
| |
74%
| TrID
| Macintosh plain text (MacBinary)
| default
| |
25%
| TrID
| MacBinary 2
| default (weak)
| |
100%
| siegfried
| fmt/1762 MacBinary (II)
| default
| |
100%
| lsar
| MacBinary
| default
|
|
id metadata |
---|
key | value |
---|
macFileType | [TEXT] |
macFileCreator | [ALFA] |
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 41 70 70 6c 65 20 | 45 76 65 6e 74 73 00 00 |..Apple |Events..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 41 4c 46 | 41 01 00 00 00 00 00 00 |.TEXTALF|A.......|
|00000050| 00 00 00 00 00 72 95 00 | 00 0c b1 aa 8f e1 53 aa |.....r..|......S.|
|00000060| 8f e1 53 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |..S.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 52 bf 00 00 |........|....R...|
|00000080| 09 09 09 09 41 70 70 6c | 65 20 45 76 65 6e 74 73 |....Appl|e Events|
|00000090| 0d 0d 41 6c 70 68 61 20 | 68 61 73 20 76 65 72 79 |..Alpha |has very|
|000000a0| 20 65 78 74 65 6e 73 69 | 76 65 20 73 75 70 70 6f | extensi|ve suppo|
|000000b0| 72 74 20 66 6f 72 20 73 | 63 72 69 70 74 69 6e 67 |rt for s|cripting|
|000000c0| 20 61 6e 64 20 69 6e 74 | 65 72 2d 61 70 70 6c 69 | and int|er-appli|
|000000d0| 63 61 74 69 6f 6e 20 0d | 63 6f 6d 6d 75 6e 69 63 |cation .|communic|
|000000e0| 61 74 69 6f 6e 2e 20 0d | 0d 09 31 29 20 41 6c 70 |ation. .|..1) Alp|
|000000f0| 68 61 20 69 73 20 63 6f | 6d 70 6c 65 74 65 6c 79 |ha is co|mpletely|
|00000100| 20 73 63 72 69 70 74 61 | 62 6c 65 20 69 6e 20 54 | scripta|ble in T|
|00000110| 63 6c 2c 20 77 68 69 63 | 68 20 69 73 20 66 61 72 |cl, whic|h is far|
|00000120| 20 62 65 74 74 65 72 20 | 73 75 69 74 65 64 20 66 | better |suited f|
|00000130| 6f 72 20 0d 09 20 20 20 | 69 6e 74 65 72 6e 61 6c |or .. |internal|
|00000140| 20 73 63 72 69 70 74 69 | 6e 67 20 74 68 61 6e 20 | scripti|ng than |
|00000150| 41 70 70 6c 65 53 63 72 | 69 70 74 2e 0d 09 20 20 |AppleScr|ipt... |
|00000160| 20 0d 09 32 29 20 41 6c | 70 68 61 20 61 63 63 65 | ..2) Al|pha acce|
|00000170| 70 74 73 20 74 68 65 20 | 72 65 71 75 69 72 65 64 |pts the |required|
|00000180| 20 61 70 70 6c 65 20 65 | 76 65 6e 74 73 2c 20 70 | apple e|vents, p|
|00000190| 6c 75 73 20 27 64 6f 73 | 63 27 2c 20 77 68 69 63 |lus 'dos|c', whic|
|000001a0| 68 20 69 73 20 75 73 65 | 64 20 0d 09 20 20 20 74 |h is use|d .. t|
|000001b0| 6f 20 74 65 6c 6c 20 41 | 6c 70 68 61 20 74 6f 20 |o tell A|lpha to |
|000001c0| 65 78 65 63 75 74 65 20 | 61 20 54 63 6c 20 73 63 |execute |a Tcl sc|
|000001d0| 72 69 70 74 2e 0d 09 20 | 20 20 0d 09 33 29 20 41 |ript... | ..3) A|
|000001e0| 6c 70 68 61 20 68 61 73 | 20 61 20 63 6f 6d 6d 61 |lpha has| a comma|
|000001f0| 6e 64 2c 20 41 45 42 75 | 69 6c 64 2c 20 77 68 69 |nd, AEBu|ild, whi|
|00000200| 63 68 20 61 6c 6c 6f 77 | 73 20 61 72 62 69 74 72 |ch allow|s arbitr|
|00000210| 61 72 69 6c 79 20 63 6f | 6d 70 6c 69 63 61 74 65 |arily co|mplicate|
|00000220| 64 20 0d 09 20 20 20 61 | 70 70 6c 65 20 65 76 65 |d .. a|pple eve|
|00000230| 6e 74 73 20 74 6f 20 62 | 65 20 62 75 69 6c 74 20 |nts to b|e built |
|00000240| 61 6e 64 20 73 65 6e 74 | 2e 20 0d 09 20 20 20 0d |and sent|. .. .|
|00000250| 09 34 29 20 51 75 65 75 | 65 27 64 20 72 65 70 6c |.4) Queu|e'd repl|
|00000260| 69 65 73 20 6f 66 20 6d | 65 73 73 61 67 65 73 20 |ies of m|essages |
|00000270| 73 65 6e 74 20 62 79 20 | 41 45 42 75 69 6c 64 20 |sent by |AEBuild |
|00000280| 61 72 65 20 41 45 50 72 | 69 6e 74 27 64 20 61 6e |are AEPr|int'd an|
|00000290| 64 20 70 61 73 73 65 64 | 20 0d 09 20 20 20 74 6f |d passed| .. to|
|000002a0| 20 74 68 65 20 74 63 6c | 20 70 72 6f 63 20 68 61 | the tcl| proc ha|
|000002b0| 6e 64 6c 65 52 65 70 6c | 79 20 28 69 6e 20 3a 54 |ndleRepl|y (in :T|
|000002c0| 63 6c 3a 53 79 73 74 65 | 6d 43 6f 64 65 3a 61 70 |cl:Syste|mCode:ap|
|000002d0| 70 6c 65 45 76 65 6e 74 | 73 2e 74 63 6c 29 2e 0d |pleEvent|s.tcl)..|
|000002e0| 09 20 20 20 0d 09 35 29 | 20 41 6c 70 68 61 20 68 |. ..5)| Alpha h|
|000002f0| 61 73 20 73 65 76 65 72 | 61 6c 20 69 6e 74 65 72 |as sever|al inter|
|00000300| 6e 61 6c 20 68 61 6e 64 | 6c 65 72 73 20 74 6f 20 |nal hand|lers to |
|00000310| 73 75 70 70 6f 72 74 20 | 69 6e 74 65 72 61 63 74 |support |interact|
|00000320| 69 6f 6e 20 77 69 74 68 | 20 0d 20 20 20 09 20 20 |ion with| . . |
|00000330| 20 54 68 69 6e 6b 2c 20 | 62 75 74 20 62 61 73 69 | Think, |but basi|
|00000340| 63 61 6c 6c 79 20 74 68 | 65 20 65 6e 74 69 72 65 |cally th|e entire|
|00000350| 20 69 6e 74 65 72 66 61 | 63 65 20 69 73 20 64 6f | interfa|ce is do|
|00000360| 6e 65 20 69 6e 20 54 63 | 6c 20 75 73 69 6e 67 20 |ne in Tc|l using |
|00000370| 0d 20 20 20 09 20 20 20 | 41 45 42 75 69 6c 64 2e |. . |AEBuild.|
|00000380| 20 43 6f 6d 70 69 6c 65 | 72 20 65 72 72 6f 72 73 | Compile|r errors|
|00000390| 20 61 72 65 20 70 61 72 | 73 65 64 20 61 6e 64 20 | are par|sed and |
|000003a0| 70 61 73 73 65 64 20 74 | 6f 20 0d 20 20 20 09 20 |passed t|o . . |
|000003b0| 20 20 27 68 61 6e 64 6c | 65 54 68 69 6e 6b 52 65 | 'handl|eThinkRe|
|000003c0| 70 6c 79 27 2e 0d 0d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |ply'...=|========|
|000003d0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000003e0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|000003f0| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000400| 3d 3d 3d 3d 3d 3d 3d 3d | 3d 3d 3d 3d 3d 3d 3d 3d |========|========|
|00000410| 3d 3d 3d 3d 3d 3d 3d 0d | 0d 54 68 65 20 66 6f 6c |=======.|.The fol|
|00000420| 6c 6f 77 69 6e 67 20 69 | 73 20 61 20 74 65 78 74 |lowing i|s a text|
|00000430| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 74 68 65 20 | version| of the |
|00000440| 41 45 42 75 69 6c 64 2f | 41 45 50 72 69 6e 74 20 |AEBuild/|AEPrint |
|00000450| 64 6f 63 73 2e 20 54 68 | 65 20 0d 57 6f 72 64 2d |docs. Th|e .Word-|
|00000460| 66 6f 72 6d 61 74 74 65 | 64 20 6f 72 69 67 69 6e |formatte|d origin|
|00000470| 61 6c 20 69 73 20 69 6e | 63 6c 75 64 65 64 20 69 |al is in|cluded i|
|00000480| 6e 20 3a 4d 69 73 63 2e | 0d 0d 41 70 70 6c 65 20 |n :Misc.|..Apple |
|00000490| 45 76 65 6e 74 73 09 54 | 68 65 20 ae 20 42 75 69 |Events.T|he . Bui|
|000004a0| 6c 64 65 72 2f 50 72 69 | 6e 74 65 72 0d 56 65 72 |lder/Pri|nter.Ver|
|000004b0| 73 69 6f 6e 20 31 2e 33 | 2e 33 0d 0d 4a 65 6e 73 |sion 1.3|.3..Jens|
|000004c0| 20 50 65 74 65 72 20 41 | 6c 66 6b 65 0d 31 31 20 | Peter A|lfke.11 |
|000004d0| 4f 63 74 6f 62 65 72 20 | 31 39 39 33 0d 41 70 70 |October |1993.App|
|000004e0| 6c 65 53 63 72 69 70 74 | 20 54 65 61 6d 0d a9 20 |leScript| Team.. |
|000004f0| 41 70 70 6c 65 20 43 6f | 6d 70 75 74 65 72 2c 20 |Apple Co|mputer, |
|00000500| 49 6e 63 2e 20 31 39 39 | 31 d0 31 39 39 33 0d 0d |Inc. 199|1.1993..|
|00000510| 49 6e 74 72 6f 64 75 63 | 74 69 6f 6e 0d 2d 2d 2d |Introduc|tion.---|
|00000520| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0d 0d 4f 4b 2c 20 57 |--------|-..OK, W|
|00000530| 68 61 74 20 49 73 20 49 | 74 3f 0d 0d 45 76 65 6e |hat Is I|t?..Even|
|00000540| 20 77 69 74 68 20 74 68 | 65 20 68 65 6c 70 66 75 | with th|e helpfu|
|00000550| 6c 20 4f 62 6a 65 63 74 | 20 53 75 70 70 6f 72 74 |l Object| Support|
|00000560| 20 4c 69 62 72 61 72 79 | 20 72 6f 75 74 69 6e 65 | Library| routine|
|00000570| 73 20 74 68 61 74 20 61 | 73 73 65 6d 62 6c 65 20 |s that a|ssemble |
|00000580| 63 6f 6d 6d 6f 6e 20 0d | 41 70 70 6c 65 20 65 76 |common .|Apple ev|
|00000590| 65 6e 74 20 6f 62 6a 65 | 63 74 20 64 65 73 63 72 |ent obje|ct descr|
|000005a0| 69 70 74 6f 72 73 2c 20 | 62 75 69 6c 64 69 6e 67 |iptors, |building|
|000005b0| 20 64 65 73 63 72 69 70 | 74 6f 72 73 20 61 6e 64 | descrip|tors and|
|000005c0| 20 65 76 65 6e 74 73 20 | 69 73 20 73 74 69 6c 6c | events |is still|
|000005d0| 20 61 20 70 61 69 6e 2e | 20 49 d5 76 65 20 0d 77 | a pain.| I.ve .w|
|000005e0| 72 69 74 74 65 6e 20 61 | 20 6c 69 62 72 61 72 79 |ritten a| library|
|000005f0| 20 6f 66 20 74 77 6f 20 | 66 75 6e 63 74 69 6f 6e | of two |function|
|00000600| 73 20 74 68 61 74 20 6d | 61 6b 65 20 69 74 20 71 |s that m|ake it q|
|00000610| 75 69 63 6b 20 61 6e 64 | 20 65 61 73 79 20 74 6f |uick and| easy to|
|00000620| 20 62 75 69 6c 64 20 6f | 72 20 64 69 73 70 6c 61 | build o|r displa|
|00000630| 79 20 0d 41 70 70 6c 65 | 20 65 76 65 6e 74 20 64 |y .Apple| event d|
|00000640| 65 73 63 72 69 70 74 6f | 72 73 20 61 6e 64 20 74 |escripto|rs and t|
|00000650| 68 65 20 41 70 70 6c 65 | 20 65 76 65 6e 74 73 20 |he Apple| events |
|00000660| 74 68 65 6d 73 65 6c 76 | 65 73 2e 0d 0d 54 68 65 |themselv|es...The|
|00000670| 20 41 45 42 75 69 6c 64 | 20 66 75 6e 63 74 69 6f | AEBuild| functio|
|00000680| 6e 20 74 61 6b 65 73 20 | 61 20 66 6f 72 6d 61 74 |n takes |a format|
|00000690| 20 73 74 72 69 6e 67 20 | d1 20 61 20 64 65 73 63 | string |. a desc|
|000006a0| 72 69 70 74 69 6f 6e 20 | 69 6e 20 61 20 76 65 72 |ription |in a ver|
|000006b0| 79 20 73 69 6d 70 6c 65 | 20 0d 6c 61 6e 67 75 61 |y simple| .langua|
|000006c0| 67 65 20 6f 66 20 61 6e | 20 41 70 70 6c 65 20 65 |ge of an| Apple e|
|000006d0| 76 65 6e 74 20 64 65 73 | 63 72 69 70 74 6f 72 20 |vent des|criptor |
|000006e0| d1 20 61 6e 64 20 67 65 | 6e 65 72 61 74 65 73 20 |. and ge|nerates |
|000006f0| 61 20 72 65 61 6c 20 64 | 65 73 63 72 69 70 74 6f |a real d|escripto|
|00000700| 72 20 28 77 68 69 63 68 | 20 0d 63 6f 75 6c 64 20 |r (which| .could |
|00000710| 62 65 20 61 20 72 65 63 | 6f 72 64 20 6f 72 20 6c |be a rec|ord or l|
|00000720| 69 73 74 20 6f 72 20 65 | 76 65 6e 74 29 20 6f 75 |ist or e|vent) ou|
|00000730| 74 20 6f 66 20 69 74 2e | 20 54 68 65 20 41 45 50 |t of it.| The AEP|
|00000740| 72 69 6e 74 20 66 75 6e | 63 74 69 6f 6e 20 64 6f |rint fun|ction do|
|00000750| 65 73 20 74 68 65 20 72 | 65 76 65 72 73 65 3a 20 |es the r|everse: |
|00000760| 0d 67 69 76 65 6e 20 61 | 6e 20 41 70 70 6c 65 20 |.given a|n Apple |
|00000770| 65 76 65 6e 74 20 64 65 | 73 63 72 69 70 74 6f 72 |event de|scriptor|
|00000780| 2c 20 6c 69 73 74 20 6f | 72 20 72 65 63 6f 72 64 |, list o|r record|
|00000790| 2c 20 69 74 20 70 72 65 | 74 74 79 70 72 69 6e 74 |, it pre|ttyprint|
|000007a0| 73 20 69 74 20 74 6f 20 | 61 20 73 74 72 69 6e 67 |s it to |a string|
|000007b0| 2e 20 28 54 68 65 20 0d | 72 65 73 75 6c 74 69 6e |. (The .|resultin|
|000007c0| 67 20 73 74 72 69 6e 67 | 2c 20 69 66 20 73 65 6e |g string|, if sen|
|000007d0| 74 20 74 6f 20 41 45 42 | 75 69 6c 64 2c 20 77 6f |t to AEB|uild, wo|
|000007e0| 75 6c 64 20 72 65 70 72 | 6f 64 75 63 65 20 74 68 |uld repr|oduce th|
|000007f0| 65 20 6f 72 69 67 69 6e | 61 6c 20 41 45 44 65 73 |e origin|al AEDes|
|00000800| 63 20 0d 73 74 72 75 63 | 74 75 72 65 2e 29 0d 0d |c .struc|ture.)..|
|00000810| 41 45 42 75 69 6c 64 20 | 63 61 6e 20 70 6c 75 67 |AEBuild |can plug|
|00000820| 20 76 61 72 69 61 62 6c | 65 20 70 61 72 61 6d 65 | variabl|e parame|
|00000830| 74 65 72 73 20 69 6e 74 | 6f 20 74 68 65 20 73 74 |ters int|o the st|
|00000840| 72 75 63 74 75 72 65 73 | 20 69 74 20 67 65 6e 65 |ructures| it gene|
|00000850| 72 61 74 65 73 20 d1 20 | 61 73 20 77 69 74 68 20 |rates . |as with |
|00000860| 0d 70 72 69 6e 74 66 2c | 20 61 6c 6c 20 79 6f 75 |.printf,| all you|
|00000870| 20 64 6f 20 69 73 20 70 | 75 74 20 6d 61 72 6b 65 | do is p|ut marke|
|00000880| 72 20 63 68 61 72 61 63 | 74 65 72 73 20 69 6e 20 |r charac|ters in |
|00000890| 74 68 65 20 66 6f 72 6d | 61 74 20 73 74 72 69 6e |the form|at strin|
|000008a0| 67 20 61 6e 64 20 73 75 | 70 70 6c 79 20 74 68 65 |g and su|pply the|
|000008b0| 20 0d 70 61 72 61 6d 65 | 74 65 72 20 76 61 6c 75 | .parame|ter valu|
|000008c0| 65 73 20 61 73 20 65 78 | 74 72 61 20 66 75 6e 63 |es as ex|tra func|
|000008d0| 74 69 6f 6e 20 61 72 67 | 75 6d 65 6e 74 73 2e 0d |tion arg|uments..|
|000008e0| 0d 54 68 65 20 62 65 6e | 65 66 69 74 73 20 6f 66 |.The ben|efits of|
|000008f0| 20 75 73 69 6e 67 20 74 | 68 69 73 20 6c 69 62 72 | using t|his libr|
|00000900| 61 72 79 20 61 72 65 20 | 66 6f 75 72 66 6f 6c 64 |ary are |fourfold|
|00000910| 3a 0d 0d 09 a5 09 49 74 | d5 73 20 65 61 73 69 65 |:.....It|.s easie|
|00000920| 72 20 66 6f 72 20 79 6f | 75 20 74 6f 20 77 72 69 |r for yo|u to wri|
|00000930| 74 65 20 74 68 65 20 63 | 6f 64 65 20 74 6f 20 62 |te the c|ode to b|
|00000940| 75 69 6c 64 20 41 70 70 | 6c 65 20 65 76 65 6e 74 |uild App|le event|
|00000950| 20 73 74 72 75 63 74 75 | 72 65 73 2e 20 59 6f 75 | structu|res. You|
|00000960| 20 0d 09 09 6f 6e 6c 79 | 20 68 61 76 65 20 74 6f | ...only| have to|
|00000970| 20 72 65 6d 65 6d 62 65 | 72 20 6f 6e 65 20 66 75 | remembe|r one fu|
|00000980| 6e 63 74 69 6f 6e 20 63 | 61 6c 6c 20 61 6e 64 20 |nction c|all and |
|00000990| 61 20 66 65 77 20 73 69 | 6d 70 6c 65 20 73 79 6e |a few si|mple syn|
|000009a0| 74 61 78 20 72 75 6c 65 | 73 2e 20 0d 09 09 59 6f |tax rule|s. ...Yo|
|000009b0| 75 72 20 72 65 73 75 6c | 74 69 6e 67 20 63 6f 64 |ur resul|ting cod|
|000009c0| 65 20 69 73 20 61 6c 73 | 6f 20 65 61 73 69 65 72 |e is als|o easier|
|000009d0| 20 74 6f 20 75 6e 64 65 | 72 73 74 61 6e 64 2e 0d | to unde|rstand..|
|000009e0| 0d 09 a5 09 41 73 20 6f | 66 20 76 65 72 73 69 6f |....As o|f versio|
|000009f0| 6e 20 31 2e 32 2c 20 79 | 6f 75 72 20 63 6f 64 65 |n 1.2, y|our code|
|00000a00| 20 69 73 20 65 76 65 6e | 20 66 61 73 74 65 72 3a | is even| faster:|
|00000a10| 20 41 45 42 75 69 6c 64 | 20 69 73 20 74 68 72 65 | AEBuild| is thre|
|00000a20| 65 20 74 6f 20 66 6f 75 | 72 20 74 69 6d 65 73 20 |e to fou|r times |
|00000a30| 0d 09 09 61 73 20 66 61 | 73 74 20 61 73 20 74 68 |...as fa|st as th|
|00000a40| 65 20 72 65 67 75 6c 61 | 72 20 41 70 70 6c 65 20 |e regula|r Apple |
|00000a50| 45 76 65 6e 74 20 4d 61 | 6e 61 67 65 72 20 72 6f |Event Ma|nager ro|
|00000a60| 75 74 69 6e 65 73 20 61 | 74 20 63 6f 6e 73 74 72 |utines a|t constr|
|00000a70| 75 63 74 69 6e 67 20 0d | 09 09 63 6f 6d 70 6c 65 |ucting .|..comple|
|00000a80| 78 20 73 74 72 75 63 74 | 75 72 65 73 2e 20 28 59 |x struct|ures. (Y|
|00000a90| 6f 75 72 20 6d 69 6c 65 | 61 67 65 20 6d 61 79 20 |our mile|age may |
|00000aa0| 76 61 72 79 2e 29 0d 0d | 09 a5 09 59 6f 75 72 20 |vary.)..|...Your |
|00000ab0| 63 6f 64 65 20 69 73 20 | 73 6d 61 6c 6c 65 72 3a |code is |smaller:|
|00000ac0| 20 74 68 65 20 63 6f 64 | 65 20 66 6f 72 20 41 45 | the cod|e for AE|
|00000ad0| 42 75 69 6c 64 20 61 6e | 64 20 74 68 65 20 41 45 |Build an|d the AE|
|00000ae0| 53 74 72 65 61 6d 20 6c | 69 62 72 61 72 79 20 69 |Stream l|ibrary i|
|00000af0| 73 20 0d 09 09 61 62 6f | 75 74 20 36 6b 20 69 6e |s ...abo|ut 6k in|
|00000b00| 20 73 69 7a 65 2c 20 61 | 6e 64 20 74 68 65 20 6f | size, a|nd the o|
|00000b10| 76 65 72 68 65 61 64 20 | 66 6f 72 20 65 61 63 68 |verhead |for each|
|00000b20| 20 63 61 6c 6c 20 69 73 | 20 6d 69 6e 69 6d 61 6c | call is| minimal|
|00000b30| 2e 20 28 4d 6f 73 74 20 | 6f 66 20 74 68 65 20 0d |. (Most |of the .|
|00000b40| 09 09 64 65 73 63 72 69 | 70 74 6f 72 20 73 74 72 |..descri|ptor str|
|00000b50| 69 6e 67 20 63 6f 6e 73 | 69 73 74 73 20 6f 66 20 |ing cons|ists of |
|00000b60| 74 68 65 20 73 61 6d 65 | 20 66 6f 75 72 2d 6c 65 |the same| four-le|
|00000b70| 74 74 65 72 20 63 6f 64 | 65 73 20 79 6f 75 d5 64 |tter cod|es you.d|
|00000b80| 20 62 65 20 75 73 69 6e | 67 20 69 6e 20 0d 09 09 | be usin|g in ...|
|00000b90| 79 6f 75 72 20 70 72 6f | 67 72 61 6d 20 63 6f 64 |your pro|gram cod|
|00000ba0| 65 20 61 6e 79 77 61 79 | 2c 20 61 6e 64 20 74 68 |e anyway|, and th|
|00000bb0| 65 20 73 74 72 69 6e 67 | 73 20 63 61 6e 20 65 76 |e string|s can ev|
|00000bc0| 65 6e 20 62 65 20 73 74 | 6f 72 65 64 20 69 6e 20 |en be st|ored in |
|00000bd0| 0d 09 09 72 65 73 6f 75 | 72 63 65 73 20 66 6f 72 |...resou|rces for|
|00000be0| 20 6d 6f 72 65 20 63 6f | 64 65 20 73 61 76 69 6e | more co|de savin|
|00000bf0| 67 73 2e 29 0d 09 09 0d | 09 a5 09 41 45 50 72 69 |gs.)....|...AEPri|
|00000c00| 6e 74 20 68 65 6c 70 73 | 20 69 6e 20 64 65 62 75 |nt helps| in debu|
|00000c10| 67 67 69 6e 67 20 70 72 | 6f 67 72 61 6d 73 2c 20 |gging pr|ograms, |
|00000c20| 62 79 20 74 75 72 6e 69 | 6e 67 20 6d 79 73 74 65 |by turni|ng myste|
|00000c30| 72 69 6f 75 73 20 41 45 | 44 65 73 63 20 0d 09 09 |rious AE|Desc ...|
|00000c40| 73 74 72 75 63 74 75 72 | 65 73 20 69 6e 74 6f 20 |structur|es into |
|00000c50| 68 75 6d 61 6e 2d 72 65 | 61 64 61 62 6c 65 20 74 |human-re|adable t|
|00000c60| 65 78 74 2e 0d 0d 57 68 | 61 74 d5 73 20 4e 65 77 |ext...Wh|at.s New|
|00000c70| 3f 0d 20 0d 49 6e 20 76 | 65 72 73 69 6f 6e 20 31 |?. .In v|ersion 1|
|00000c80| 2e 33 3a 0d 0d a5 09 41 | 20 6e 65 77 20 66 75 6e |.3:....A| new fun|
|00000c90| 63 74 69 6f 6e 2c 20 41 | 45 50 72 69 6e 74 53 69 |ction, A|EPrintSi|
|00000ca0| 7a 65 2c 20 63 6f 6d 70 | 75 74 65 73 20 68 6f 77 |ze, comp|utes how|
|00000cb0| 20 6c 6f 6e 67 20 74 68 | 65 20 73 74 72 69 6e 67 | long th|e string|
|00000cc0| 20 62 75 69 6c 74 20 62 | 79 20 41 45 50 72 69 6e | built b|y AEPrin|
|00000cd0| 74 20 0d 09 77 6f 75 6c | 64 20 62 65 2c 20 77 69 |t ..woul|d be, wi|
|00000ce0| 74 68 6f 75 74 20 61 63 | 74 75 61 6c 6c 79 20 63 |thout ac|tually c|
|00000cf0| 72 65 61 74 69 6e 67 20 | 69 74 2e 20 54 68 69 73 |reating |it. This|
|00000d00| 20 69 73 20 75 73 65 66 | 75 6c 20 69 66 20 79 6f | is usef|ul if yo|
|00000d10| 75 20 77 61 6e 74 20 74 | 6f 20 61 6c 6c 6f 63 61 |u want t|o alloca|
|00000d20| 74 65 20 0d 09 73 74 6f | 72 61 67 65 20 66 6f 72 |te ..sto|rage for|
|00000d30| 20 74 68 65 20 73 74 72 | 69 6e 67 20 64 79 6e 61 | the str|ing dyna|
|00000d40| 6d 69 63 61 6c 6c 79 2e | 0d 0d a5 09 41 45 50 72 |mically.|....AEPr|
|00000d50| 69 6e 74 20 6e 6f 20 6c | 6f 6e 67 65 72 20 74 72 |int no l|onger tr|
|00000d60| 75 6e 63 61 74 65 73 20 | 68 65 78 20 64 75 6d 70 |uncates |hex dump|
|00000d70| 73 20 28 6f 66 20 75 6e | 6b 6e 6f 77 6e 20 64 65 |s (of un|known de|
|00000d80| 73 63 72 69 70 74 6f 72 | 73 29 20 61 66 74 65 72 |scriptor|s) after|
|00000d90| 20 33 32 20 0d 09 62 79 | 74 65 73 2e 0d 0d 41 6e | 32 ..by|tes...An|
|00000da0| 64 20 69 6e 20 76 65 72 | 73 69 6f 6e 20 31 2e 33 |d in ver|sion 1.3|
|00000db0| 2e 32 3a 0d 0d a5 09 41 | 45 50 72 69 6e 74 20 6e |.2:....A|EPrint n|
|00000dc0| 6f 20 6c 6f 6e 67 65 72 | 20 75 73 65 73 20 74 68 |o longer| uses th|
|00000dd0| 65 20 73 74 64 69 6f 20 | 6c 69 62 72 61 72 79 2e |e stdio |library.|
|00000de0| 20 54 68 69 73 20 73 68 | 6f 75 6c 64 20 68 65 6c | This sh|ould hel|
|00000df0| 70 20 72 65 64 75 63 65 | 20 63 6f 64 65 20 73 69 |p reduce| code si|
|00000e00| 7a 65 20 0d 09 28 61 6e | 64 20 65 6c 69 6d 69 6e |ze ..(an|d elimin|
|00000e10| 61 74 65 20 73 6f 6d 65 | 20 70 72 6f 62 6c 65 6d |ate some| problem|
|00000e20| 73 20 69 6e 20 63 6f 64 | 65 20 72 65 73 6f 75 72 |s in cod|e resour|
|00000e30| 63 65 73 29 20 62 75 74 | 20 74 6f 20 64 6f 20 69 |ces) but| to do i|
|00000e40| 74 20 49 20 68 61 64 20 | 74 6f 20 63 72 69 70 70 |t I had |to cripp|
|00000e50| 6c 65 20 0d 09 66 6c 6f | 61 74 69 6e 67 2d 70 6f |le ..flo|ating-po|
|00000e60| 69 6e 74 20 64 69 73 70 | 6c 61 79 2e 20 46 6c 6f |int disp|lay. Flo|
|00000e70| 61 74 69 6e 67 2d 70 6f | 69 6e 74 20 64 65 73 63 |ating-po|int desc|
|00000e80| 72 69 70 74 6f 72 73 20 | 6e 6f 77 20 70 72 69 6e |riptors |now prin|
|00000e90| 74 20 61 73 20 74 68 65 | 20 69 6e 74 65 67 65 72 |t as the| integer|
|00000ea0| 20 70 61 72 74 20 0d 09 | 66 6f 6c 6c 6f 77 65 64 | part ..|followed|
|00000eb0| 20 62 79 20 d2 2e 58 58 | 58 58 d3 2e 0d 09 0d 41 | by ..XX|XX.....A|
|00000ec0| 6e 64 20 69 6e 20 76 65 | 72 73 69 6f 6e 20 31 2e |nd in ve|rsion 1.|
|00000ed0| 33 2e 33 3a 0d 0d a5 09 | 41 66 74 65 72 20 61 20 |3.3:....|After a |
|00000ee0| 62 72 69 6c 6c 69 61 6e | 74 20 73 75 67 67 65 73 |brillian|t sugges|
|00000ef0| 74 69 6f 6e 20 62 79 20 | 52 6f 62 20 44 79 65 2c |tion by |Rob Dye,|
|00000f00| 20 41 45 50 72 69 6e 74 | 20 6e 6f 77 20 75 73 65 | AEPrint| now use|
|00000f10| 73 20 74 68 65 20 62 75 | 69 6c 74 20 69 6e 20 66 |s the bu|ilt in f|
|00000f20| 6c 6f 61 74 2d 0d 09 74 | 6f 2d 74 65 78 74 20 63 |loat-..t|o-text c|
|00000f30| 6f 65 72 63 69 6f 6e 20 | 74 6f 20 64 69 73 70 6c |oercion |to displ|
|00000f40| 61 79 20 66 6c 6f 61 74 | 69 6e 67 2d 70 6f 69 6e |ay float|ing-poin|
|00000f50| 74 20 64 65 73 63 72 69 | 70 74 6f 72 73 2e 0d 0d |t descri|ptors...|
|00000f60| a5 09 46 69 78 65 64 20 | 61 20 70 6f 73 73 69 62 |..Fixed |a possib|
|00000f70| 6c 65 20 70 72 6f 62 6c | 65 6d 20 77 69 74 68 20 |le probl|em with |
|00000f80| 41 45 42 75 69 6c 64 20 | 69 6e 70 75 74 20 73 74 |AEBuild |input st|
|00000f90| 72 69 6e 67 73 20 63 6f | 6e 74 61 69 6e 69 6e 67 |rings co|ntaining|
|00000fa0| 20 52 65 74 75 72 6e 20 | 0d 09 63 68 61 72 61 63 | Return |..charac|
|00000fb0| 74 65 72 73 2c 20 69 6e | 20 74 68 65 20 4d 50 57 |ters, in| the MPW|
|00000fc0| 20 76 65 72 73 69 6f 6e | 20 6f 66 20 74 68 65 20 | version| of the |
|00000fd0| 6c 69 62 72 61 72 79 2e | 0d 0d 48 6f 77 20 54 6f |library.|..How To|
|00000fe0| 20 43 61 6c 6c 20 74 68 | 65 20 46 75 6e 63 74 69 | Call th|e Functi|
|00000ff0| 6f 6e 73 0d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ons.----|--------|
|00001000| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 0d 0d 54 |--------|-----..T|
|00001010| 68 65 73 65 20 61 72 65 | 20 61 6c 6c 20 43 20 66 |hese are| all C f|
|00001020| 75 6e 63 74 69 6f 6e 73 | 2e 20 54 68 65 79 20 61 |unctions|. They a|
|00001030| 6c 6c 20 74 61 6b 65 20 | 76 61 72 69 61 62 6c 65 |ll take |variable|
|00001040| 20 6e 75 6d 62 65 72 73 | 20 6f 66 20 61 72 67 75 | numbers| of argu|
|00001050| 6d 65 6e 74 73 2c 20 73 | 6f 20 74 68 65 79 d5 64 |ments, s|o they.d|
|00001060| 20 0d 62 65 20 64 69 66 | 66 69 63 75 6c 74 20 6f | .be dif|ficult o|
|00001070| 72 20 69 6d 70 6f 73 73 | 69 62 6c 65 20 74 6f 20 |r imposs|ible to |
|00001080| 63 61 6c 6c 20 66 72 6f | 6d 20 50 61 73 63 61 6c |call fro|m Pascal|
|00001090| 2c 20 61 6e 79 77 61 79 | 2e 20 28 41 6e 64 20 72 |, anyway|. (And r|
|000010a0| 65 6d 65 6d 62 65 72 2c | 20 6b 69 64 73 3a 20 74 |emember,| kids: t|
|000010b0| 68 65 72 65 20 0d 61 72 | 65 20 6e 6f 20 50 61 73 |here .ar|e no Pas|
|000010c0| 63 61 6c 20 63 6f 6d 70 | 69 6c 65 72 73 20 66 6f |cal comp|ilers fo|
|000010d0| 72 20 74 68 65 20 50 6f | 77 65 72 50 43 20 63 68 |r the Po|werPC ch|
|000010e0| 69 70 c9 29 0d 0d 41 45 | 42 75 69 6c 64 0d 0d 4f |ip.)..AE|Build..O|
|000010f0| 53 45 72 72 0d 09 41 45 | 42 75 69 6c 64 28 20 20 |SErr..AE|Build( |
|00001100| 41 45 44 65 73 63 20 2a | 64 65 73 63 2c 20 63 6f |AEDesc *|desc, co|
|00001110| 6e 73 74 20 63 68 61 72 | 20 2a 64 65 73 63 72 69 |nst char| *descri|
|00001120| 70 74 6f 72 53 74 72 2c | 20 2e 2e 2e 20 29 2c 0d |ptorStr,| ... ),.|
|00001130| 09 76 41 45 42 75 69 6c | 64 28 20 41 45 44 65 73 |.vAEBuil|d( AEDes|
|00001140| 63 20 2a 64 65 73 63 2c | 20 63 6f 6e 73 74 20 63 |c *desc,| const c|
|00001150| 68 61 72 20 2a 64 65 73 | 63 72 69 70 74 6f 72 53 |har *des|criptorS|
|00001160| 74 72 2c 20 76 6f 69 64 | 20 2a 61 72 67 73 20 29 |tr, void| *args )|
|00001170| 3b 0d 0d 41 45 42 75 69 | 6c 64 20 72 65 61 64 73 |;..AEBui|ld reads|
|00001180| 20 61 20 6e 75 6c 6c 2d | 74 65 72 6d 69 6e 61 74 | a null-|terminat|
|00001190| 65 64 20 64 65 73 63 72 | 69 70 74 6f 72 20 73 74 |ed descr|iptor st|
|000011a0| 72 69 6e 67 20 28 75 73 | 75 61 6c 6c 79 20 61 20 |ring (us|ually a |
|000011b0| 63 6f 6e 73 74 61 6e 74 | 2c 20 61 6c 74 68 6f 75 |constant|, althou|
|000011c0| 67 68 20 69 74 20 0d 63 | 6f 75 6c 64 20 63 6f 6d |gh it .c|ould com|
|000011d0| 65 20 66 72 6f 6d 20 61 | 6e 79 77 68 65 72 65 29 |e from a|nywhere)|
|000011e0| 2c 20 70 61 72 73 65 73 | 20 69 74 20 61 6e 64 20 |, parses| it and |
|000011f0| 62 75 69 6c 64 73 20 61 | 20 63 6f 72 72 65 73 70 |builds a| corresp|
|00001200| 6f 6e 64 69 6e 67 20 41 | 45 44 65 73 63 20 0d 73 |onding A|EDesc .s|
|00001210| 74 72 75 63 74 75 72 65 | 2e 20 28 44 6f 6e d5 74 |tructure|. (Don.t|
|00001220| 20 77 6f 72 72 79 2c 20 | 49 d5 6c 6c 20 64 65 73 | worry, |I.ll des|
|00001230| 63 72 69 62 65 20 74 68 | 65 20 73 79 6e 74 61 78 |cribe th|e syntax|
|00001240| 20 6f 66 20 74 68 65 20 | 64 65 73 63 72 69 70 74 | of the |descript|
|00001250| 6f 72 20 73 74 72 69 6e | 67 20 69 6e 20 74 68 65 |or strin|g in the|
|00001260| 20 0d 6e 65 78 74 20 73 | 65 63 74 69 6f 6e 2e 29 | .next s|ection.)|
|00001270| 20 49 66 20 74 68 65 20 | 64 65 73 63 72 69 70 74 | If the |descript|
|00001280| 6f 72 20 73 74 72 69 6e | 67 20 63 6f 6e 74 61 69 |or strin|g contai|
|00001290| 6e 73 20 6d 61 67 69 63 | 20 70 61 72 61 6d 65 74 |ns magic| paramet|
|000012a0| 65 72 2d 73 75 62 73 74 | 69 74 75 74 69 6f 6e 20 |er-subst|itution |
|000012b0| 0d 63 68 61 72 61 63 74 | 65 72 73 20 28 d2 40 d3 |.charact|ers (.@.|
|000012c0| 29 20 74 68 65 6e 20 63 | 6f 72 72 65 73 70 6f 6e |) then c|orrespon|
|000012d0| 64 69 6e 67 20 76 61 6c | 75 65 73 20 6f 66 20 74 |ding val|ues of t|
|000012e0| 68 65 20 63 6f 72 72 65 | 63 74 20 74 79 70 65 20 |he corre|ct type |
|000012f0| 6d 75 73 74 20 62 65 20 | 73 75 70 70 6c 69 65 64 |must be |supplied|
|00001300| 20 0d 61 73 20 66 75 6e | 63 74 69 6f 6e 20 61 72 | .as fun|ction ar|
|00001310| 67 75 6d 65 6e 74 73 2c | 20 6a 75 73 74 20 61 73 |guments,| just as|
|00001320| 20 77 69 74 68 20 70 72 | 69 6e 74 66 2e 0d 0d 28 | with pr|intf...(|
|00001330| 76 41 45 42 75 69 6c 64 | 20 69 73 20 61 6e 61 6c |vAEBuild| is anal|
|00001340| 6f 67 6f 75 73 20 74 6f | 20 76 70 72 69 6e 74 66 |ogous to| vprintf|
|00001350| 3a 20 49 6e 73 74 65 61 | 64 20 6f 66 20 70 61 73 |: Instea|d of pas|
|00001360| 73 69 6e 67 20 74 68 65 | 20 70 61 72 61 6d 65 74 |sing the| paramet|
|00001370| 65 72 73 20 61 6c 6f 6e | 67 20 77 69 74 68 20 0d |ers alon|g with .|
|00001380| 74 68 65 20 66 75 6e 63 | 74 69 6f 6e 2c 20 79 6f |the func|tion, yo|
|00001390| 75 20 73 75 70 70 6c 79 | 20 61 20 76 61 5f 6c 69 |u supply| a va_li|
|000013a0| 73 74 2c 20 61 73 20 64 | 65 66 69 6e 65 64 20 69 |st, as d|efined i|
|000013b0| 6e 20 3c 73 74 64 61 72 | 67 2e 68 3e 2c 20 74 68 |n <stdar|g.h>, th|
|000013c0| 61 74 20 70 6f 69 6e 74 | 73 20 74 6f 20 74 68 65 |at point|s to the|
|000013d0| 20 0d 70 61 72 61 6d 65 | 74 65 72 20 6c 69 73 74 | .parame|ter list|
|000013e0| 2e 20 49 74 d5 73 20 6f | 74 68 65 72 77 69 73 65 |. It.s o|therwise|
|000013f0| 20 69 64 65 6e 74 69 63 | 61 6c 2e 29 0d 0d 41 45 | identic|al.)..AE|
|00001400| 42 75 69 6c 64 20 72 65 | 74 75 72 6e 73 20 61 6e |Build re|turns an|
|00001410| 20 4f 53 45 72 72 2e 20 | 41 6e 79 20 65 72 72 6f | OSErr. |Any erro|
|00001420| 72 73 20 72 65 74 75 72 | 6e 65 64 20 62 79 20 41 |rs retur|ned by A|
|00001430| 70 70 6c 65 20 45 76 65 | 6e 74 20 4d 61 6e 61 67 |pple Eve|nt Manag|
|00001440| 65 72 20 72 6f 75 74 69 | 6e 65 73 20 0d 77 68 69 |er routi|nes .whi|
|00001450| 6c 65 20 62 75 69 6c 64 | 69 6e 67 20 74 68 65 20 |le build|ing the |
|00001460| 64 65 73 63 72 69 70 74 | 6f 72 20 77 69 6c 6c 20 |descript|or will |
|00001470| 62 65 20 73 65 6e 74 20 | 62 61 63 6b 20 74 6f 20 |be sent |back to |
|00001480| 79 6f 75 2e 20 54 68 65 | 20 6d 6f 73 74 20 6c 69 |you. The| most li|
|00001490| 6b 65 6c 79 20 72 65 73 | 75 6c 74 73 20 61 72 65 |kely res|ults are|
|000014a0| 20 0d 6d 65 6d 46 75 6c | 6c 45 72 72 20 61 6e 64 | .memFul|lErr and|
|000014b0| 20 65 72 72 41 45 43 6f | 65 72 63 69 6f 6e 46 61 | errAECo|ercionFa|
|000014c0| 69 6c 2e 20 41 6c 73 6f | 20 6c 69 6b 65 6c 79 20 |il. Also| likely |
|000014d0| 69 73 20 61 65 42 75 69 | 6c 64 53 79 6e 74 61 78 |is aeBui|ldSyntax|
|000014e0| 45 72 72 2c 20 72 65 73 | 75 6c 74 69 6e 67 20 0d |Err, res|ulting .|
|000014f0| 66 72 6f 6d 20 61 6e 20 | 69 6e 63 6f 72 72 65 63 |from an |incorrec|
|00001500| 74 20 64 65 73 63 72 69 | 70 74 6f 72 20 73 74 72 |t descri|ptor str|
|00001510| 69 6e 67 2e 20 28 4d 61 | 6b 65 20 73 75 72 65 20 |ing. (Ma|ke sure |
|00001520| 74 6f 20 64 65 62 75 67 | 20 79 6f 75 72 20 64 65 |to debug| your de|
|00001530| 73 63 72 69 70 74 6f 72 | 20 73 74 72 69 6e 67 73 |scriptor| strings|
|00001540| 2c 20 0d 70 65 72 68 61 | 70 73 20 75 73 69 6e 67 |, .perha|ps using|
|00001550| 20 74 68 65 20 64 65 6d | 6f 20 61 70 70 6c 69 63 | the dem|o applic|
|00001560| 61 74 69 6f 6e 2c 20 62 | 65 66 6f 72 65 20 79 6f |ation, b|efore yo|
|00001570| 75 20 70 75 74 20 74 68 | 65 6d 20 69 6e 20 70 72 |u put th|em in pr|
|00001580| 6f 67 72 61 6d 73 21 29 | 0d 54 68 65 20 62 61 73 |ograms!)|.The bas|
|00001590| 69 63 20 76 65 72 73 69 | 6f 6e 20 6f 66 20 41 45 |ic versi|on of AE|
|000015a0| 42 75 69 6c 64 20 6a 75 | 73 74 20 72 65 70 6f 72 |Build ju|st repor|
|000015b0| 74 73 20 74 68 61 74 20 | 61 20 73 79 6e 74 61 78 |ts that |a syntax|
|000015c0| 20 65 72 72 6f 72 20 6f | 63 63 75 72 72 65 64 2c | error o|ccurred,|
|000015d0| 20 77 69 74 68 6f 75 74 | 20 0d 67 69 76 69 6e 67 | without| .giving|
|000015e0| 20 61 6e 79 20 61 64 64 | 69 74 69 6f 6e 61 6c 20 | any add|itional |
|000015f0| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 2e 20 49 66 20 |informat|ion. If |
|00001600| 79 6f 75 20 77 61 6e 74 | 20 74 6f 20 6b 6e 6f 77 |you want| to know|
|00001610| 20 6d 6f 72 65 20 28 70 | 65 72 68 61 70 73 20 74 | more (p|erhaps t|
|00001620| 68 65 20 73 74 72 69 6e | 67 20 0d 63 61 6d 65 20 |he strin|g .came |
|00001630| 66 72 6f 6d 20 61 20 75 | 73 65 72 2c 20 74 6f 20 |from a u|ser, to |
|00001640| 77 68 6f 6d 20 79 6f 75 | d5 64 20 6c 69 6b 65 20 |whom you|.d like |
|00001650| 74 6f 20 72 65 70 6f 72 | 74 20 61 20 68 65 6c 70 |to repor|t a help|
|00001660| 66 75 6c 20 65 72 72 6f | 72 20 6d 65 73 73 61 67 |ful erro|r messag|
|00001670| 65 29 20 79 6f 75 20 63 | 61 6e 20 0d 75 73 65 20 |e) you c|an .use |
|00001680| 74 68 65 20 6f 74 68 65 | 72 20 76 65 72 73 69 6f |the othe|r versio|
|00001690| 6e 20 6f 66 20 74 68 65 | 20 6c 69 62 72 61 72 79 |n of the| library|
|000016a0| 2e 20 54 68 69 73 20 76 | 65 72 73 69 6f 6e 20 69 |. This v|ersion i|
|000016b0| 6e 63 6c 75 64 65 73 20 | 61 20 77 65 65 20 62 69 |ncludes |a wee bi|
|000016c0| 74 20 6f 66 20 65 78 74 | 72 61 20 63 6f 64 65 2c |t of ext|ra code,|
|000016d0| 20 0d 61 6e 64 20 74 77 | 6f 20 67 6c 6f 62 61 6c | .and tw|o global|
|000016e0| 20 76 61 72 69 61 62 6c | 65 73 20 74 68 61 74 20 | variabl|es that |
|000016f0| 77 69 6c 6c 20 63 6f 6e | 74 61 69 6e 20 75 73 65 |will con|tain use|
|00001700| 66 75 6c 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ful info|rmation |
|00001710| 61 66 74 65 72 20 61 20 | 73 79 6e 74 61 78 20 65 |after a |syntax e|
|00001720| 72 72 6f 72 3a 0d 0d 65 | 78 74 65 72 6e 20 41 45 |rror:..e|xtern AE|
|00001730| 42 75 69 6c 64 5f 53 79 | 6e 74 61 78 45 72 72 54 |Build_Sy|ntaxErrT|
|00001740| 79 70 65 0d 09 41 45 42 | 75 69 6c 64 5f 45 72 72 |ype..AEB|uild_Err|
|00001750| 43 6f 64 65 3b 0d 65 78 | 74 65 72 6e 20 6c 6f 6e |Code;.ex|tern lon|
|00001760| 67 0d 09 41 45 42 75 69 | 6c 64 5f 45 72 72 50 6f |g..AEBui|ld_ErrPo|
|00001770| 73 3b 0d 0d 41 45 42 75 | 69 6c 64 5f 45 72 72 43 |s;..AEBu|ild_ErrC|
|00001780| 6f 64 65 20 69 73 20 61 | 6e 20 65 6e 75 6d 65 72 |ode is a|n enumer|
|00001790| 61 74 65 64 20 76 61 6c | 75 65 20 74 68 61 74 20 |ated val|ue that |
|000017a0| 77 69 6c 6c 20 63 6f 6e | 74 61 69 6e 20 61 20 73 |will con|tain a s|
|000017b0| 70 65 63 69 66 69 63 20 | 65 72 72 6f 72 20 63 6f |pecific |error co|
|000017c0| 64 65 2e 20 0d 54 68 65 | 20 65 72 72 6f 72 20 63 |de. .The| error c|
|000017d0| 6f 64 65 73 20 61 72 65 | 20 64 65 66 69 6e 65 64 |odes are| defined|
|000017e0| 20 69 6e 20 41 45 42 75 | 69 6c 64 2e 68 2e 20 41 | in AEBu|ild.h. A|
|000017f0| 45 42 75 69 6c 64 5f 45 | 72 72 50 6f 73 20 77 69 |EBuild_E|rrPos wi|
|00001800| 6c 6c 20 63 6f 6e 74 61 | 69 6e 20 74 68 65 20 69 |ll conta|in the i|
|00001810| 6e 64 65 78 20 0d 69 6e | 74 6f 20 74 68 65 20 64 |ndex .in|to the d|
|00001820| 65 73 63 72 69 70 74 6f | 72 20 73 74 72 69 6e 67 |escripto|r string|
|00001830| 20 61 74 20 77 68 69 63 | 68 20 74 68 65 20 65 72 | at whic|h the er|
|00001840| 72 6f 72 20 6f 63 63 75 | 72 72 65 64 3a 20 75 73 |ror occu|rred: us|
|00001850| 75 61 6c 6c 79 20 6f 6e | 65 20 63 68 61 72 61 63 |ually on|e charac|
|00001860| 74 65 72 20 70 61 73 74 | 20 0d 74 68 65 20 65 6e |ter past| .the en|
|00001870| 64 20 6f 66 20 74 68 65 | 20 6f 66 66 65 6e 64 69 |d of the| offendi|
|00001880| 6e 67 20 74 6f 6b 65 6e | 2e 0d 41 45 42 75 69 6c |ng token|..AEBuil|
|00001890| 64 50 61 72 61 6d 65 74 | 65 72 73 0d 0d 41 45 42 |dParamet|ers..AEB|
|000018a0| 75 69 6c 64 50 61 72 61 | 6d 65 74 65 72 73 0d 0d |uildPara|meters..|
|000018b0| 4f 53 45 72 72 09 41 45 | 42 75 69 6c 64 50 61 72 |OSErr.AE|BuildPar|
|000018c0| 61 6d 65 74 65 72 73 28 | 20 20 41 70 70 6c 65 45 |ameters(| AppleE|
|000018d0| 76 65 6e 74 20 2a 65 76 | 65 6e 74 2c 20 63 6f 6e |vent *ev|ent, con|
|000018e0| 73 74 20 63 68 61 72 20 | 2a 64 65 73 63 72 69 70 |st char |*descrip|
|000018f0| 74 6f 72 53 74 72 2c 20 | 2e 2e 2e 20 29 3b 0d 0d |torStr, |... );..|
|00001900| 41 45 42 75 69 6c 64 50 | 61 72 61 6d 65 74 65 72 |AEBuildP|arameter|
|00001910| 73 20 61 64 64 73 20 70 | 61 72 61 6d 65 74 65 72 |s adds p|arameter|
|00001920| 73 20 61 6e 64 2f 6f 72 | 20 61 74 74 72 69 62 75 |s and/or| attribu|
|00001930| 74 65 73 20 74 6f 20 61 | 6e 20 65 78 69 73 74 69 |tes to a|n existi|
|00001940| 6e 67 20 41 70 70 6c 65 | 20 0d 65 76 65 6e 74 2e |ng Apple| .event.|
|00001950| 20 64 65 73 63 72 69 70 | 74 6f 72 53 74 72 20 73 | descrip|torStr s|
|00001960| 70 65 63 69 66 69 65 73 | 20 74 68 65 20 70 61 72 |pecifies| the par|
|00001970| 61 6d 65 74 65 72 73 20 | 28 72 65 71 75 69 72 65 |ameters |(require|
|00001980| 64 20 61 6e 64 20 6f 70 | 74 69 6f 6e 61 6c 29 20 |d and op|tional) |
|00001990| 61 6e 64 20 0d 61 74 74 | 72 69 62 75 74 65 73 2e |and .att|ributes.|
|000019a0| 20 49 74 73 20 73 79 6e | 74 61 78 20 69 73 20 64 | Its syn|tax is d|
|000019b0| 65 73 63 72 69 62 65 64 | 20 62 65 6c 6f 77 20 28 |escribed| below (|
|000019c0| 73 65 65 20 65 73 70 65 | 63 69 61 6c 6c 79 20 74 |see espe|cially t|
|000019d0| 68 65 20 41 70 70 6c 65 | 20 45 76 65 6e 74 20 0d |he Apple| Event .|
|000019e0| 44 65 73 63 72 69 70 74 | 6f 72 20 53 74 72 69 6e |Descript|or Strin|
|000019f0| 67 73 20 73 75 62 73 65 | 63 74 69 6f 6e 29 3b 20 |gs subse|ction); |
|00001a00| 69 74 d5 73 20 61 6c 6d | 6f 73 74 20 74 68 65 20 |it.s alm|ost the |
|00001a10| 73 61 6d 65 20 61 73 20 | 74 68 65 20 73 79 6e 74 |same as |the synt|
|00001a20| 61 78 20 66 6f 72 20 41 | 45 42 75 69 6c 64 2c 20 |ax for A|EBuild, |
|00001a30| 0d 77 69 74 68 20 61 20 | 66 65 77 20 61 64 64 69 |.with a |few addi|
|00001a40| 74 69 6f 6e 73 20 61 6e | 64 20 6d 6f 64 69 66 69 |tions an|d modifi|
|00001a50| 63 61 74 69 6f 6e 73 2e | 0d 0d 28 76 41 45 42 75 |cations.|..(vAEBu|
|00001a60| 69 6c 64 50 61 72 61 6d | 65 74 65 72 73 20 69 73 |ildParam|eters is|
|00001a70| 20 61 6e 61 6c 6f 67 6f | 75 73 20 74 6f 20 76 70 | analogo|us to vp|
|00001a80| 72 69 6e 74 66 3a 20 49 | 6e 73 74 65 61 64 20 6f |rintf: I|nstead o|
|00001a90| 66 20 70 61 73 73 69 6e | 67 20 74 68 65 20 70 61 |f passin|g the pa|
|00001aa0| 72 61 6d 65 74 65 72 73 | 20 0d 61 6c 6f 6e 67 20 |rameters| .along |
|00001ab0| 77 69 74 68 20 74 68 65 | 20 66 75 6e 63 74 69 6f |with the| functio|
|00001ac0| 6e 2c 20 79 6f 75 20 73 | 75 70 70 6c 79 20 61 20 |n, you s|upply a |
|00001ad0| 76 61 5f 6c 69 73 74 2c | 20 61 73 20 64 65 66 69 |va_list,| as defi|
|00001ae0| 6e 65 64 20 69 6e 20 3c | 73 74 64 61 72 67 2e 68 |ned in <|stdarg.h|
|00001af0| 3e 2c 20 74 68 61 74 20 | 0d 70 6f 69 6e 74 73 20 |>, that |.points |
|00001b00| 74 6f 20 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |to the p|arameter|
|00001b10| 20 6c 69 73 74 2e 20 49 | 74 d5 73 20 6f 74 68 65 | list. I|t.s othe|
|00001b20| 72 77 69 73 65 20 69 64 | 65 6e 74 69 63 61 6c 2e |rwise id|entical.|
|00001b30| 29 0d 0d 41 45 42 75 69 | 6c 64 41 70 70 6c 65 45 |)..AEBui|ldAppleE|
|00001b40| 76 65 6e 74 0d 0d 41 45 | 42 75 69 6c 64 41 70 70 |vent..AE|BuildApp|
|00001b50| 6c 65 45 76 65 6e 74 28 | 09 41 45 45 76 65 6e 74 |leEvent(|.AEEvent|
|00001b60| 43 6c 61 73 73 20 74 68 | 65 43 6c 61 73 73 2c 20 |Class th|eClass, |
|00001b70| 41 45 45 76 65 6e 74 49 | 44 20 74 68 65 49 44 2c |AEEventI|D theID,|
|00001b80| 0d 09 09 09 09 09 44 65 | 73 63 54 79 70 65 20 61 |......De|scType a|
|00001b90| 64 64 72 65 73 73 54 79 | 70 65 2c 20 76 6f 69 64 |ddressTy|pe, void|
|00001ba0| 20 2a 61 64 64 72 65 73 | 73 44 61 74 61 2c 20 6c | *addres|sData, l|
|00001bb0| 6f 6e 67 20 61 64 64 72 | 65 73 73 4c 65 6e 67 74 |ong addr|essLengt|
|00001bc0| 68 2c 0d 09 09 09 09 09 | 73 68 6f 72 74 20 72 65 |h,......|short re|
|00001bd0| 74 75 72 6e 49 44 2c 20 | 6c 6f 6e 67 20 74 72 61 |turnID, |long tra|
|00001be0| 6e 73 61 63 74 69 6f 6e | 49 44 2c 0d 09 09 09 09 |nsaction|ID,.....|
|00001bf0| 09 41 70 70 6c 65 45 76 | 65 6e 74 20 2a 65 76 65 |.AppleEv|ent *eve|
|00001c00| 6e 74 2c 0d 09 09 09 09 | 09 63 6f 6e 73 74 20 63 |nt,.....|.const c|
|00001c10| 68 61 72 20 2a 64 65 73 | 63 72 69 70 74 6f 72 53 |har *des|criptorS|
|00001c20| 74 72 2c 20 2e 2e 2e 20 | 29 3b 0d 0d 41 45 42 75 |tr, ... |);..AEBu|
|00001c30| 69 6c 64 41 70 70 6c 65 | 45 76 65 6e 74 20 69 73 |ildApple|Event is|
|00001c40| 20 6c 69 6b 65 20 41 45 | 42 75 69 6c 64 20 62 75 | like AE|Build bu|
|00001c50| 74 20 62 75 69 6c 64 73 | 20 61 6e 20 41 70 70 6c |t builds| an Appl|
|00001c60| 65 20 65 76 65 6e 74 2c | 20 69 6e 63 6c 75 64 69 |e event,| includi|
|00001c70| 6e 67 20 0d 70 61 72 61 | 6d 65 74 65 72 73 20 61 |ng .para|meters a|
|00001c80| 6e 64 20 61 74 74 72 69 | 62 75 74 65 73 2e 20 4f |nd attri|butes. O|
|00001c90| 72 2c 20 79 6f 75 20 63 | 6f 75 6c 64 20 73 61 79 |r, you c|ould say|
|00001ca0| 20 74 68 61 74 20 69 74 | d5 73 20 6c 69 6b 65 20 | that it|.s like |
|00001cb0| 41 45 42 75 69 6c 64 50 | 61 72 61 6d 65 74 65 72 |AEBuildP|arameter|
|00001cc0| 73 20 62 75 74 20 0d 63 | 72 65 61 74 65 73 20 74 |s but .c|reates t|
|00001cd0| 68 65 20 65 76 65 6e 74 | 20 66 72 6f 6d 20 73 63 |he event| from sc|
|00001ce0| 72 61 74 63 68 2e 0d 0d | 4d 6f 73 74 20 6f 66 20 |ratch...|Most of |
|00001cf0| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 73 20 61 |the para|meters a|
|00001d00| 72 65 20 6a 75 73 74 20 | 6c 69 6b 65 20 74 68 65 |re just |like the|
|00001d10| 20 70 61 72 61 6d 65 74 | 65 72 73 20 74 6f 20 41 | paramet|ers to A|
|00001d20| 45 43 72 65 61 74 65 41 | 70 70 6c 65 45 76 65 6e |ECreateA|ppleEven|
|00001d30| 74 2c 20 0d 61 6c 74 68 | 6f 75 67 68 20 79 6f 75 |t, .alth|ough you|
|00001d40| 20 70 61 73 73 20 74 68 | 65 20 74 61 72 67 65 74 | pass th|e target|
|00001d50| 20 61 64 64 72 65 73 73 | 20 64 61 74 61 20 64 69 | address| data di|
|00001d60| 72 65 63 74 6c 79 2c 20 | 69 6e 73 74 65 61 64 20 |rectly, |instead |
|00001d70| 6f 66 20 76 69 61 20 61 | 20 70 72 65 2d 62 75 69 |of via a| pre-bui|
|00001d80| 6c 74 20 0d 64 65 73 63 | 72 69 70 74 6f 72 2e 20 |lt .desc|riptor. |
|00001d90| 54 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 41 70 |The resu|lting Ap|
|00001da0| 70 6c 65 20 65 76 65 6e | 74 20 77 69 6c 6c 20 61 |ple even|t will a|
|00001db0| 70 70 65 61 72 20 69 6e | 20 74 68 65 20 65 76 65 |ppear in| the eve|
|00001dc0| 6e 74 20 70 61 72 61 6d | 65 74 65 72 2e 0d 64 65 |nt param|eter..de|
|00001dd0| 73 63 72 69 70 74 6f 72 | 53 74 72 20 73 70 65 63 |scriptor|Str spec|
|00001de0| 69 66 69 65 73 20 74 68 | 65 20 70 61 72 61 6d 65 |ifies th|e parame|
|00001df0| 74 65 72 73 20 28 72 65 | 71 75 69 72 65 64 20 61 |ters (re|quired a|
|00001e00| 6e 64 20 6f 70 74 69 6f | 6e 61 6c 29 20 61 6e 64 |nd optio|nal) and|
|00001e10| 20 61 74 74 72 69 62 75 | 74 65 73 2e 20 0d 54 68 | attribu|tes. .Th|
|00001e20| 65 20 73 79 6e 74 61 78 | 20 69 73 20 64 65 73 63 |e syntax| is desc|
|00001e30| 72 69 62 65 64 20 62 65 | 6c 6f 77 20 28 73 65 65 |ribed be|low (see|
|00001e40| 20 65 73 70 65 63 69 61 | 6c 6c 79 20 74 68 65 20 | especia|lly the |
|00001e50| 41 70 70 6c 65 20 45 76 | 65 6e 74 20 44 65 73 63 |Apple Ev|ent Desc|
|00001e60| 72 69 70 74 6f 72 20 53 | 74 72 69 6e 67 73 20 0d |riptor S|trings .|
|00001e70| 73 75 62 73 65 63 74 69 | 6f 6e 29 3b 20 69 74 d5 |subsecti|on); it.|
|00001e80| 73 20 61 6c 6d 6f 73 74 | 20 74 68 65 20 73 61 6d |s almost| the sam|
|00001e90| 65 20 61 73 20 74 68 65 | 20 73 79 6e 74 61 78 20 |e as the| syntax |
|00001ea0| 66 6f 72 20 41 45 42 75 | 69 6c 64 2c 20 77 69 74 |for AEBu|ild, wit|
|00001eb0| 68 20 61 20 66 65 77 20 | 61 64 64 69 74 69 6f 6e |h a few |addition|
|00001ec0| 73 20 0d 61 6e 64 20 6d | 6f 64 69 66 69 63 61 74 |s .and m|odificat|
|00001ed0| 69 6f 6e 73 2e 0d 0d 28 | 76 41 45 42 75 69 6c 64 |ions...(|vAEBuild|
|00001ee0| 41 70 70 6c 65 45 76 65 | 6e 74 20 69 73 20 61 6e |AppleEve|nt is an|
|00001ef0| 61 6c 6f 67 6f 75 73 20 | 74 6f 20 76 70 72 69 6e |alogous |to vprin|
|00001f00| 74 66 3a 20 49 6e 73 74 | 65 61 64 20 6f 66 20 70 |tf: Inst|ead of p|
|00001f10| 61 73 73 69 6e 67 20 74 | 68 65 20 70 61 72 61 6d |assing t|he param|
|00001f20| 65 74 65 72 73 20 0d 61 | 6c 6f 6e 67 20 77 69 74 |eters .a|long wit|
|00001f30| 68 20 74 68 65 20 66 75 | 6e 63 74 69 6f 6e 2c 20 |h the fu|nction, |
|00001f40| 79 6f 75 20 73 75 70 70 | 6c 79 20 61 20 76 61 5f |you supp|ly a va_|
|00001f50| 6c 69 73 74 2c 20 61 73 | 20 64 65 66 69 6e 65 64 |list, as| defined|
|00001f60| 20 69 6e 20 3c 73 74 64 | 61 72 67 2e 68 3e 2c 20 | in <std|arg.h>, |
|00001f70| 74 68 61 74 20 0d 70 6f | 69 6e 74 73 20 74 6f 20 |that .po|ints to |
|00001f80| 74 68 65 20 70 61 72 61 | 6d 65 74 65 72 20 6c 69 |the para|meter li|
|00001f90| 73 74 2e 20 49 74 d5 73 | 20 6f 74 68 65 72 77 69 |st. It.s| otherwi|
|00001fa0| 73 65 20 69 64 65 6e 74 | 69 63 61 6c 2e 29 0d 0d |se ident|ical.)..|
|00001fb0| 41 45 50 72 69 6e 74 0d | 0d 4f 53 45 72 72 20 41 |AEPrint.|.OSErr A|
|00001fc0| 45 50 72 69 6e 74 28 20 | 41 45 44 65 73 63 20 2a |EPrint( |AEDesc *|
|00001fd0| 64 65 73 63 2c 20 63 68 | 61 72 20 2a 62 75 66 53 |desc, ch|ar *bufS|
|00001fe0| 74 72 2c 20 6c 6f 6e 67 | 20 62 75 66 53 69 7a 65 |tr, long| bufSize|
|00001ff0| 20 29 3b 0d 0d 41 45 50 | 72 69 6e 74 20 72 65 61 | );..AEP|rint rea|
|00002000| 64 73 20 74 68 65 20 41 | 70 70 6c 65 20 65 76 65 |ds the A|pple eve|
|00002010| 6e 74 20 64 65 73 63 72 | 69 70 74 6f 72 20 64 65 |nt descr|iptor de|
|00002020| 73 63 20 61 6e 64 20 77 | 72 69 74 65 73 20 61 20 |sc and w|rites a |
|00002030| 63 6f 72 72 65 73 70 6f | 6e 64 69 6e 67 20 0d 64 |correspo|nding .d|
|00002040| 65 73 63 72 69 70 74 6f | 72 20 73 74 72 69 6e 67 |escripto|r string|
|00002050| 20 69 6e 74 6f 20 74 68 | 65 20 73 74 72 69 6e 67 | into th|e string|
|00002060| 20 70 6f 69 6e 74 65 64 | 20 74 6f 20 62 79 20 62 | pointed| to by b|
|00002070| 75 66 53 74 72 2e 20 49 | 74 20 77 69 6c 6c 20 77 |ufStr. I|t will w|
|00002080| 72 69 74 65 20 6e 6f 20 | 6d 6f 72 65 20 74 68 61 |rite no |more tha|
|00002090| 6e 20 0d 62 75 66 53 69 | 7a 65 20 63 68 61 72 61 |n .bufSi|ze chara|
|000020a0| 63 74 65 72 73 2c 20 69 | 6e 63 6c 75 64 69 6e 67 |cters, i|ncluding|
|000020b0| 20 74 68 65 20 74 72 61 | 69 6c 69 6e 67 20 6e 75 | the tra|iling nu|
|000020c0| 6c 6c 20 63 68 61 72 61 | 63 74 65 72 2e 20 41 6e |ll chara|cter. An|
|000020d0| 79 20 65 72 72 6f 72 73 | 20 72 65 74 75 72 6e 65 |y errors| returne|
|000020e0| 64 20 62 79 20 0d 41 70 | 70 6c 65 20 45 76 65 6e |d by .Ap|ple Even|
|000020f0| 74 20 4d 61 6e 61 67 65 | 72 20 72 6f 75 74 69 6e |t Manage|r routin|
|00002100| 65 73 20 77 69 6c 6c 20 | 62 65 20 72 65 74 75 72 |es will |be retur|
|00002110| 6e 65 64 20 74 6f 20 74 | 68 65 20 63 61 6c 6c 65 |ned to t|he calle|
|00002120| 72 3b 20 74 68 69 73 20 | 69 73 6e d5 74 20 76 65 |r; this |isn.t ve|
|00002130| 72 79 20 6c 69 6b 65 6c | 79 20 0d 75 6e 6c 65 73 |ry likel|y .unles|
|00002140| 73 20 74 68 65 20 41 45 | 44 65 73 63 20 73 74 72 |s the AE|Desc str|
|00002150| 75 63 74 75 72 65 20 69 | 73 20 73 6f 6d 65 68 6f |ucture i|s someho|
|00002160| 77 20 63 6f 72 72 75 70 | 74 2e 0d 0d 54 68 65 20 |w corrup|t...The |
|00002170| 64 65 73 63 72 69 70 74 | 6f 72 20 73 74 72 69 6e |descript|or strin|
|00002180| 67 20 70 72 6f 64 75 63 | 65 64 2c 20 69 66 20 73 |g produc|ed, if s|
|00002190| 65 6e 74 20 74 6f 20 41 | 45 42 75 69 6c 64 2c 20 |ent to A|EBuild, |
|000021a0| 77 69 6c 6c 20 62 75 69 | 6c 64 20 61 20 64 65 73 |will bui|ld a des|
|000021b0| 63 72 69 70 74 6f 72 20 | 0d 69 64 65 6e 74 69 63 |criptor |.identic|
|000021c0| 61 6c 20 74 6f 20 74 68 | 65 20 6f 72 69 67 69 6e |al to th|e origin|
|000021d0| 61 6c 20 6f 6e 65 2e 20 | 41 45 50 72 69 6e 74 20 |al one. |AEPrint |
|000021e0| 74 72 69 65 73 20 74 6f | 20 64 65 74 65 63 74 20 |tries to| detect |
|000021f0| 41 45 52 65 63 6f 72 64 | 73 20 74 68 61 74 20 68 |AERecord|s that h|
|00002200| 61 76 65 20 62 65 65 6e | 20 0d 63 6f 65 72 63 65 |ave been| .coerce|
|00002210| 64 20 74 6f 20 6f 74 68 | 65 72 20 74 79 70 65 73 |d to oth|er types|
|00002220| 20 61 6e 64 20 70 72 69 | 6e 74 20 74 68 65 6d 20 | and pri|nt them |
|00002230| 61 73 20 63 6f 65 72 63 | 65 64 20 72 65 63 6f 72 |as coerc|ed recor|
|00002240| 64 73 2e 20 53 74 72 75 | 63 74 75 72 65 73 20 6f |ds. Stru|ctures o|
|00002250| 66 20 75 6e 6b 6e 6f 77 | 6e 20 0d 74 79 70 65 20 |f unknow|n .type |
|00002260| 74 68 61 74 20 63 61 6e | d5 74 20 62 65 20 63 6f |that can|.t be co|
|00002270| 65 72 63 65 64 20 74 6f | 20 41 45 52 65 63 6f 72 |erced to| AERecor|
|00002280| 64 73 20 61 72 65 20 64 | 75 6d 70 65 64 20 61 73 |ds are d|umped as|
|00002290| 20 68 65 78 20 64 61 74 | 61 2e 0d 0d 41 45 50 72 | hex dat|a...AEPr|
|000022a0| 69 6e 74 20 63 61 6e 20 | 61 6c 73 6f 20 70 72 69 |int can |also pri|
|000022b0| 6e 74 20 63 6f 6d 70 6c | 65 74 65 20 41 70 70 6c |nt compl|ete Appl|
|000022c0| 65 20 65 76 65 6e 74 73 | 20 61 73 20 77 65 6c 6c |e events| as well|
|000022d0| 20 61 73 20 72 65 67 75 | 6c 61 72 20 64 65 73 63 | as regu|lar desc|
|000022e0| 72 69 70 74 6f 72 73 2e | 20 54 68 65 20 0d 73 79 |riptors.| The .sy|
|000022f0| 6e 74 61 78 20 6f 66 20 | 74 68 65 20 72 65 73 75 |ntax of |the resu|
|00002300| 6c 74 69 6e 67 20 73 74 | 72 69 6e 67 20 66 6f 72 |lting st|ring for|
|00002310| 20 61 6e 20 65 76 65 6e | 74 20 69 73 20 6c 69 6b | an even|t is lik|
|00002320| 65 20 74 68 61 74 20 75 | 73 65 64 20 62 79 20 41 |e that u|sed by A|
|00002330| 45 42 75 69 6c 64 50 61 | 72 61 6d 65 74 65 72 73 |EBuildPa|rameters|
|00002340| 20 0d 61 6e 64 20 41 45 | 42 75 69 6c 64 41 70 70 | .and AE|BuildApp|
|00002350| 6c 65 45 76 65 6e 74 2c | 20 65 78 63 65 70 74 20 |leEvent,| except |
|00002360| 74 68 61 74 3a 0d 0d a5 | 09 54 68 65 20 73 74 72 |that:...|.The str|
|00002370| 69 6e 67 20 62 65 67 69 | 6e 73 20 77 69 74 68 20 |ing begi|ns with |
|00002380| 74 68 65 20 65 76 65 6e | 74 20 63 6c 61 73 73 20 |the even|t class |
|00002390| 61 6e 64 20 49 44 20 73 | 65 70 61 72 61 74 65 64 |and ID s|eparated|
|000023a0| 20 62 79 20 61 20 62 61 | 63 6b 73 6c 61 73 68 2e | by a ba|ckslash.|
|000023b0| 0d a5 09 74 68 65 20 70 | 61 72 61 6d 65 74 65 72 |...the p|arameter|
|000023c0| 20 6c 69 73 74 20 69 73 | 20 73 75 72 72 6f 75 6e | list is| surroun|
|000023d0| 64 65 64 20 62 79 20 63 | 75 72 6c 79 20 62 72 61 |ded by c|urly bra|
|000023e0| 63 65 73 2e 0d a5 09 41 | 74 74 72 69 62 75 74 65 |ces....A|ttribute|
|000023f0| 73 20 61 72 65 20 61 6c | 73 6f 20 64 69 73 70 6c |s are al|so displ|
|00002400| 61 79 65 64 3b 20 74 68 | 65 79 20 6c 6f 6f 6b 20 |ayed; th|ey look |
|00002410| 6c 69 6b 65 20 70 61 72 | 61 6d 65 74 65 72 73 20 |like par|ameters |
|00002420| 62 75 74 20 61 72 65 20 | 70 72 65 63 65 64 65 64 |but are |preceded|
|00002430| 20 62 79 20 0d 09 d2 26 | d3 73 2e 0d 0d 75 09 54 | by ...&|.s...u.T|
|00002440| 68 65 20 62 75 69 6c 64 | 65 72 20 66 75 6e 63 74 |he build|er funct|
|00002450| 69 6f 6e 73 20 64 6f 20 | 6e 6f 74 20 61 63 63 65 |ions do |not acce|
|00002460| 70 74 20 74 68 69 73 20 | 65 76 65 6e 74 20 73 79 |pt this |event sy|
|00002470| 6e 74 61 78 20 79 65 74 | 2e ca ca 75 0d 0d 41 45 |ntax yet|...u..AE|
|00002480| 50 72 69 6e 74 53 69 7a | 65 0d 0d 4f 53 45 72 72 |PrintSiz|e..OSErr|
|00002490| 20 41 45 50 72 69 6e 74 | 53 69 7a 65 28 20 41 45 | AEPrint|Size( AE|
|000024a0| 44 65 73 63 20 2a 64 65 | 73 63 2c 20 6c 6f 6e 67 |Desc *de|sc, long|
|000024b0| 20 2a 62 75 66 53 69 7a | 65 4e 65 65 64 65 64 20 | *bufSiz|eNeeded |
|000024c0| 29 3b 0d 0d 41 45 50 72 | 69 6e 74 53 69 7a 65 20 |);..AEPr|intSize |
|000024d0| 63 6f 6d 70 75 74 65 73 | 20 74 68 65 20 62 75 66 |computes| the buf|
|000024e0| 66 65 72 20 73 69 7a 65 | 20 74 68 61 74 20 41 45 |fer size| that AE|
|000024f0| 50 72 69 6e 74 20 77 6f | 75 6c 64 20 72 65 71 75 |Print wo|uld requ|
|00002500| 69 72 65 20 69 66 20 67 | 69 76 65 6e 20 74 68 65 |ire if g|iven the|
|00002510| 20 0d 73 61 6d 65 20 64 | 65 73 63 72 69 70 74 6f | .same d|escripto|
|00002520| 72 2e 20 28 54 68 65 20 | 73 69 7a 65 20 69 73 20 |r. (The |size is |
|00002530| 65 71 75 61 6c 20 74 6f | 20 74 68 65 20 73 74 72 |equal to| the str|
|00002540| 69 6e 67 20 6c 65 6e 67 | 74 68 2c 20 70 6c 75 73 |ing leng|th, plus|
|00002550| 20 31 20 62 79 74 65 20 | 66 6f 72 20 74 68 65 20 | 1 byte |for the |
|00002560| 74 72 61 69 6c 69 6e 67 | 20 0d 6e 75 6c 6c 2e 29 |trailing| .null.)|
|00002570| 20 54 68 69 73 20 69 73 | 20 68 61 6e 64 79 20 66 | This is| handy f|
|00002580| 6f 72 20 70 72 65 2d 66 | 6c 69 67 68 74 69 6e 67 |or pre-f|lighting|
|00002590| 20 41 45 50 72 69 6e 74 | 2c 20 69 66 20 79 6f 75 | AEPrint|, if you|
|000025a0| 20 77 61 6e 74 20 74 6f | 20 61 6c 6c 6f 63 61 74 | want to| allocat|
|000025b0| 65 20 74 68 65 20 62 75 | 66 66 65 72 20 0d 64 79 |e the bu|ffer .dy|
|000025c0| 6e 61 6d 69 63 61 6c 6c | 79 20 20 69 6e 73 74 65 |namicall|y inste|
|000025d0| 61 64 20 6f 66 20 72 65 | 6c 79 69 6e 67 20 6f 6e |ad of re|lying on|
|000025e0| 20 6f 6e 65 20 6f 66 20 | 66 69 78 65 64 20 73 69 | one of |fixed si|
|000025f0| 7a 65 20 2e 0d 0d 44 65 | 73 63 72 69 70 74 6f 72 |ze ...De|scriptor|
|00002600| 2d 53 74 72 69 6e 67 20 | 53 79 6e 74 61 78 0d 2d |-String |Syntax.-|
|00002610| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|00002620| 2d 2d 2d 2d 2d 2d 2d 0d | 0d 54 68 65 20 72 65 61 |-------.|.The rea|
|00002630| 6c 20 6d 65 61 74 20 6f | 66 20 61 6c 6c 20 74 68 |l meat o|f all th|
|00002640| 69 73 2c 20 6f 66 20 63 | 6f 75 72 73 65 2c 20 69 |is, of c|ourse, i|
|00002650| 73 20 74 68 65 20 73 79 | 6e 74 61 78 20 6f 66 20 |s the sy|ntax of |
|00002660| 74 68 65 20 64 65 73 63 | 72 69 70 74 6f 72 20 73 |the desc|riptor s|
|00002670| 74 72 69 6e 67 73 2e 20 | 49 74 d5 73 20 0d 70 72 |trings. |It.s .pr|
|00002680| 65 74 74 79 20 73 69 6d | 70 6c 65 3a 20 62 61 73 |etty sim|ple: bas|
|00002690| 69 63 20 64 61 74 61 20 | 74 79 70 65 73 20 6c 69 |ic data |types li|
|000026a0| 6b 65 20 6e 75 6d 62 65 | 72 73 20 61 6e 64 20 73 |ke numbe|rs and s|
|000026b0| 74 72 69 6e 67 73 20 63 | 61 6e 20 62 65 20 64 65 |trings c|an be de|
|000026c0| 73 63 72 69 62 65 64 20 | 0d 64 69 72 65 63 74 6c |scribed |.directl|
|000026d0| 79 2c 20 61 6e 64 20 74 | 68 65 6e 20 62 75 69 6c |y, and t|hen buil|
|000026e0| 74 20 75 70 20 69 6e 74 | 6f 20 6c 69 73 74 73 20 |t up int|o lists |
|000026f0| 61 6e 64 20 72 65 63 6f | 72 64 73 2e 20 49 d5 76 |and reco|rds. I.v|
|00002700| 65 20 65 76 65 6e 20 70 | 72 6f 76 69 64 65 64 20 |e even p|rovided |
|00002710| 61 20 70 73 65 75 64 6f | 2d 0d 42 4e 46 20 67 72 |a pseudo|-.BNF gr|
|00002720| 61 6d 6d 61 72 20 28 6e | 65 78 74 20 73 65 63 74 |ammar (n|ext sect|
|00002730| 69 6f 6e 29 20 66 6f 72 | 20 74 68 6f 73 65 20 6f |ion) for| those o|
|00002740| 66 20 79 6f 75 20 77 68 | 6f 20 61 63 74 75 61 6c |f you wh|o actual|
|00002750| 6c 79 20 65 6e 6a 6f 79 | 20 72 65 61 64 69 6e 67 |ly enjoy| reading|
|00002760| 20 74 68 6f 73 65 20 74 | 68 69 6e 67 73 2e 0d 0d | those t|hings...|
|00002770| 42 61 73 69 63 20 54 79 | 70 65 73 0d 0d 54 68 65 |Basic Ty|pes..The|
|00002780| 20 66 75 6e 64 61 6d 65 | 6e 74 61 6c 20 64 61 74 | fundame|ntal dat|
|00002790| 61 20 74 79 70 65 73 20 | 61 72 65 3a 0d 0d 54 79 |a types |are:..Ty|
|000027a0| 70 65 20 20 20 20 20 20 | 20 20 20 20 20 20 45 78 |pe | Ex|
|000027b0| 61 6d 70 6c 65 73 20 20 | 20 20 20 20 20 20 54 79 |amples | Ty|
|000027c0| 70 65 2d 63 6f 64 65 20 | 20 20 20 20 20 20 44 65 |pe-code | De|
|000027d0| 73 63 72 69 70 74 69 6f | 6e 0d 2d 2d 2d 2d 20 20 |scriptio|n.---- |
|000027e0| 20 20 20 20 20 20 20 20 | 20 20 2d 2d 2d 2d 2d 2d | | ------|
|000027f0| 2d 2d 20 20 20 20 20 20 | 20 20 2d 2d 2d 2d 2d 2d |-- | ------|
|00002800| 2d 2d 2d 20 20 20 20 20 | 20 20 2d 2d 2d 2d 2d 2d |--- | ------|
|00002810| 2d 2d 2d 2d 2d 0d 49 6e | 74 65 67 65 72 20 20 20 |-----.In|teger |
|00002820| 20 20 20 20 20 20 31 32 | 33 34 20 20 20 20 20 20 | 12|34 |
|00002830| 20 20 20 20 20 20 27 6c | 6f 6e 67 27 20 6f 72 20 | 'l|ong' or |
|00002840| 20 20 20 20 20 20 41 20 | 73 65 71 75 65 6e 63 65 | A |sequence|
|00002850| 20 6f 66 20 64 65 63 69 | 6d 61 6c 20 64 69 67 69 | of deci|mal digi|
|00002860| 74 73 2c 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |ts,. | |
|00002870| 20 20 20 20 2d 35 36 37 | 38 20 20 20 20 20 20 20 | -567|8 |
|00002880| 20 20 20 20 27 73 68 6f | 72 27 20 20 20 20 20 20 | 'sho|r' |
|00002890| 20 20 20 20 6f 70 74 69 | 6f 6e 61 6c 6c 79 20 70 | opti|onally p|
|000028a0| 72 65 63 65 64 65 64 20 | 62 79 20 61 20 6d 69 6e |receded |by a min|
|000028b0| 75 73 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |us. | |
|000028c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000028d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000028e0| 20 20 20 73 69 67 6e 2e | 0d 0d 45 6e 75 6d 2f 54 | sign.|..Enum/T|
|000028f0| 79 70 65 20 20 20 20 20 | 20 20 77 68 6f 73 20 20 |ype | whos |
|00002900| 20 20 20 20 20 20 20 20 | 20 20 27 65 6e 75 6d 27 | | 'enum'|
|00002910| 20 20 20 20 20 20 20 20 | 20 20 41 20 6d 61 67 69 | | A magi|
|00002920| 63 20 66 6f 75 72 2d 6c | 65 74 74 65 72 20 63 6f |c four-l|etter co|
|00002930| 64 65 2e 20 57 69 6c 6c | 20 62 65 0d 43 6f 64 65 |de. Will| be.Code|
|00002940| 20 20 20 20 20 20 20 20 | 20 20 20 20 6c 6f 6e 67 | | long|
|00002950| 69 6e 74 20 20 20 20 20 | 20 20 20 20 28 55 73 65 |int | (Use|
|00002960| 20 63 6f 65 72 63 69 6f | 6e 20 20 20 74 72 75 6e | coercio|n trun|
|00002970| 63 61 74 65 64 20 6f 72 | 20 70 61 64 64 65 64 20 |cated or| padded |
|00002980| 77 69 74 68 20 73 70 61 | 63 65 73 0d 20 20 20 20 |with spa|ces. |
|00002990| 20 20 20 20 20 20 20 20 | 20 20 20 20 27 6c 6f 6e | | 'lon|
|000029a0| 67 27 20 20 20 20 20 20 | 20 20 20 20 74 6f 20 63 |g' | to c|
|000029b0| 68 61 6e 67 65 20 74 6f | 20 20 20 20 74 6f 20 65 |hange to| to e|
|000029c0| 78 61 63 74 6c 79 20 66 | 6f 75 72 20 63 68 61 72 |xactly f|our char|
|000029d0| 61 63 74 65 72 73 2e 20 | 49 66 20 79 6f 75 0d 20 |acters. |If you. |
|000029e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 3c | | <|
|000029f0| 3d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 27 |= | '|
|00002a00| 74 79 70 65 27 29 20 20 | 20 20 20 20 20 20 20 70 |type') | p|
|00002a10| 75 74 20 73 74 72 61 69 | 67 68 74 20 6f 72 20 63 |ut strai|ght or c|
|00002a20| 75 72 6c 79 20 73 69 6e | 67 6c 65 2d 0d 20 20 20 |urly sin|gle-. |
|00002a30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 27 38 2d | | '8-|
|00002a40| 29 27 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |)' | |
|00002a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 71 75 6f | | quo|
|00002a60| 74 65 73 20 61 72 6f 75 | 6e 64 20 69 74 2c 20 69 |tes arou|nd it, i|
|00002a70| 74 20 63 61 6e 20 63 6f | 6e 74 61 69 6e 0d 20 20 |t can co|ntain. |
|00002a80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 d4 5a | | .Z|
|00002a90| 51 20 35 d5 20 20 20 20 | 20 20 20 20 20 20 20 20 |Q 5. | |
|00002aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 61 6e | | an|
|00002ab0| 79 20 63 68 61 72 61 63 | 74 65 72 73 2e 20 49 66 |y charac|ters. If|
|00002ac0| 20 6e 6f 74 2c 20 69 74 | 20 63 61 6e d5 74 0d 20 | not, it| can.t. |
|00002ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 6d | | m|
|00002ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002af0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 63 | | c|
|00002b00| 6f 6e 74 61 69 6e 20 61 | 6e 79 20 6f 66 3a 20 40 |ontain a|ny of: @|
|00002b10| d4 27 d2 d3 3a 2d 2c 28 | 5b 7b 7d 5d 29 0d 20 20 |.'..:-,(|[{}]). |
|00002b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002b40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 61 6e | | an|
|00002b50| 64 20 63 61 6e d5 74 20 | 62 65 67 69 6e 20 77 69 |d can.t |begin wi|
|00002b60| 74 68 20 61 20 64 69 67 | 69 74 2e 0d 0d 53 74 72 |th a dig|it...Str|
|00002b70| 69 6e 67 20 20 20 20 20 | 20 d2 41 20 53 74 72 69 |ing | .A Stri|
|00002b80| 6e 67 2e d3 20 20 20 20 | 20 20 20 20 20 27 54 45 |ng.. | 'TE|
|00002b90| 58 54 27 20 20 20 20 20 | 20 20 20 20 20 41 6e 79 |XT' | Any|
|00002ba0| 20 73 65 71 75 65 6e 63 | 65 20 6f 66 20 63 68 61 | sequenc|e of cha|
|00002bb0| 72 61 63 74 65 72 73 0d | 20 20 20 20 20 20 20 20 |racters.| |
|00002bc0| 20 20 20 20 d2 4d 75 6c | 74 69 70 6c 65 20 6c 69 | .Mul|tiple li|
|00002bd0| 6e 65 73 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |nes | |
|00002be0| 20 20 20 20 20 20 20 20 | 77 69 74 68 69 6e 20 6f | |within o|
|00002bf0| 70 65 6e 20 61 6e 64 20 | 63 6c 6f 73 65 20 63 75 |pen and |close cu|
|00002c00| 72 6c 79 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |rly. | |
|00002c10| 61 72 65 20 6f 6b 61 79 | 2e d3 20 20 20 20 20 20 |are okay|.. |
|00002c20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002c30| 20 20 20 20 71 75 6f 74 | 65 73 2e 20 57 6f 6e d5 | quot|es. Won.|
|00002c40| 74 20 62 65 20 6e 75 6c | 6c 2d 74 65 72 6d 69 6e |t be nul|l-termin|
|00002c50| 61 74 65 64 2e 0d 0d 48 | 65 78 20 44 61 74 61 20 |ated...H|ex Data |
|00002c60| 20 20 20 c7 34 31 37 30 | 37 30 36 43 36 35 c8 20 | .4170|706C65. |
|00002c70| 20 20 20 20 20 20 20 3f | 3f 20 20 20 20 20 20 20 | ?|? |
|00002c80| 20 20 20 20 20 20 20 41 | 6e 20 65 76 65 6e 20 6e | A|n even n|
|00002c90| 75 6d 62 65 72 20 6f 66 | 20 68 65 78 20 64 69 67 |umber of| hex dig|
|00002ca0| 69 74 73 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |its. | |
|00002cb0| c7 30 31 30 32 20 30 33 | 66 66 20 20 20 20 20 20 |.0102 03|ff |
|00002cc0| 20 20 20 20 28 4d 75 73 | 74 20 62 65 20 20 20 20 | (Mus|t be |
|00002cd0| 20 20 20 20 62 65 74 77 | 65 65 6e 20 46 72 65 6e | betw|een Fren|
|00002ce0| 63 68 20 71 75 6f 74 65 | 73 20 28 4f 70 74 69 6f |ch quote|s (Optio|
|00002cf0| 6e 2d 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |n-. | |
|00002d00| 65 20 62 20 36 20 63 c8 | 20 20 20 20 20 20 20 20 |e b 6 c.| |
|00002d10| 20 20 20 63 6f 65 72 63 | 65 64 20 74 6f 20 20 20 | coerc|ed to |
|00002d20| 20 20 20 5c 2c 20 4f 70 | 74 69 6f 6e 2d 53 68 69 | \, Op|tion-Shi|
|00002d30| 66 74 2d 5c 29 2e 20 57 | 68 69 74 65 73 70 61 63 |ft-\). W|hitespac|
|00002d40| 65 20 69 73 0d 20 20 20 | 20 20 20 20 20 20 20 20 |e is. | |
|00002d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00002d60| 20 20 20 20 20 73 6f 6d | 65 20 74 79 70 65 29 20 | som|e type) |
|00002d70| 20 20 20 20 20 69 67 6e | 6f 72 65 64 2e 0d 0d 75 | ign|ored...u|
|00002d80| 20 59 65 73 2c 20 79 6f | 75 20 68 61 76 65 20 74 | Yes, yo|u have t|
|00002d90| 6f 20 75 73 65 20 74 68 | 65 20 61 63 74 75 61 6c |o use th|e actual|
|00002da0| 20 66 6f 75 72 2d 6c 65 | 74 74 65 72 20 63 6f 64 | four-le|tter cod|
|00002db0| 65 73 20 66 6f 72 20 65 | 6e 75 6d 73 2c 20 74 79 |es for e|nums, ty|
|00002dc0| 70 65 20 63 6f 64 65 73 | 2c 20 6b 65 79 77 6f 72 |pe codes|, keywor|
|00002dd0| 64 73 20 0d 61 6e 64 20 | 6f 62 6a 65 63 74 20 74 |ds .and |object t|
|00002de0| 79 70 65 73 2c 20 69 6e | 73 74 65 61 64 20 6f 66 |ypes, in|stead of|
|00002df0| 20 74 68 65 20 6d 6e 65 | 6d 6f 6e 69 63 20 63 6f | the mne|monic co|
|00002e00| 6e 73 74 61 6e 74 73 2e | 20 20 4c 75 63 6b 69 6c |nstants.| Luckil|
|00002e10| 79 20 74 68 65 20 63 6f | 64 65 73 20 61 72 65 20 |y the co|des are |
|00002e20| 0d 73 65 6d 69 2d 6d 6e | 65 6d 6f 6e 69 63 20 61 |.semi-mn|emonic a|
|00002e30| 6e 79 77 61 79 2e 20 20 | 49 20 64 69 64 20 69 74 |nyway. |I did it|
|00002e40| 20 74 68 69 73 20 77 61 | 79 20 74 6f 20 61 76 6f | this wa|y to avo|
|00002e50| 69 64 20 74 68 65 20 6d | 61 73 73 69 76 65 20 6f |id the m|assive o|
|00002e60| 76 65 72 68 65 61 64 2c | 20 62 6f 74 68 20 69 6e |verhead,| both in|
|00002e70| 20 63 6f 64 65 20 0d 73 | 69 7a 65 20 61 6e 64 20 | code .s|ize and |
|00002e80| 65 78 65 63 75 74 69 6f | 6e 20 73 70 65 65 64 2c |executio|n speed,|
|00002e90| 20 6f 66 20 61 20 73 79 | 6d 62 6f 6c 20 74 61 62 | of a sy|mbol tab|
|00002ea0| 6c 65 2e 20 20 59 6f 75 | 20 63 61 6e 20 66 69 6e |le. You| can fin|
|00002eb0| 64 20 74 68 65 20 64 65 | 66 69 6e 69 74 69 6f 6e |d the de|finition|
|00002ec0| 73 20 6f 66 20 74 68 65 | 20 0d 63 6f 6e 73 74 61 |s of the| .consta|
|00002ed0| 6e 74 73 20 69 6e 20 74 | 68 65 20 74 65 78 74 20 |nts in t|he text |
|00002ee0| 66 69 6c 65 20 d2 41 45 | 4f 62 6a 65 63 74 73 2e |file .AE|Objects.|
|00002ef0| 70 d3 2c 20 77 68 69 63 | 68 20 69 73 20 70 61 72 |p., whic|h is par|
|00002f00| 74 20 6f 66 20 74 68 65 | 20 41 70 70 6c 65 20 45 |t of the| Apple E|
|00002f10| 76 65 6e 74 73 20 4f 62 | 6a 65 63 74 20 0d 53 75 |vents Ob|ject .Su|
|00002f20| 70 70 6f 72 74 20 4c 69 | 62 72 61 72 79 2e ca ca |pport Li|brary...|
|00002f30| 75 0d 0d 43 6f 65 72 63 | 69 6f 6e 0d 0d 41 6e 79 |u..Coerc|ion..Any|
|00002f40| 20 62 61 73 69 63 20 65 | 6c 65 6d 65 6e 74 20 28 | basic e|lement (|
|00002f50| 65 78 63 65 70 74 20 61 | 20 68 65 78 20 73 74 72 |except a| hex str|
|00002f60| 69 6e 67 29 20 62 79 20 | 69 74 73 65 6c 66 20 69 |ing) by |itself i|
|00002f70| 73 20 61 20 64 65 73 63 | 72 69 70 74 6f 72 2c 20 |s a desc|riptor, |
|00002f80| 77 68 6f 73 65 20 0d 64 | 65 73 63 72 69 70 74 6f |whose .d|escripto|
|00002f90| 72 54 79 70 65 20 69 73 | 20 61 73 20 67 69 76 65 |rType is| as give|
|00002fa0| 6e 20 69 6e 20 74 68 65 | 20 74 61 62 6c 65 2e 20 |n in the| table. |
|00002fb0| 59 6f 75 20 63 61 6e 20 | 63 6f 65 72 63 65 20 61 |You can |coerce a|
|00002fc0| 20 62 61 73 69 63 20 65 | 6c 65 6d 65 6e 74 20 74 | basic e|lement t|
|00002fd0| 6f 20 61 20 0d 64 69 66 | 66 65 72 65 6e 74 20 74 |o a .dif|ferent t|
|00002fe0| 79 70 65 20 62 79 20 70 | 75 74 74 69 6e 67 20 69 |ype by p|utting i|
|00002ff0| 74 20 69 6e 20 70 61 72 | 65 6e 74 68 65 73 65 73 |t in par|entheses|
|00003000| 20 77 69 74 68 20 61 20 | 74 79 70 65 2d 63 6f 64 | with a |type-cod|
|00003010| 65 20 70 6c 61 63 65 64 | 20 62 65 66 6f 72 65 20 |e placed| before |
|00003020| 69 74 2e 20 48 65 72 65 | 20 0d 61 72 65 20 73 6f |it. Here| .are so|
|00003030| 6d 65 20 65 78 61 6d 70 | 6c 65 73 3a 0d 0d 09 73 |me examp|les:...s|
|00003040| 69 6e 67 28 31 32 33 34 | 29 0d 09 74 79 70 65 28 |ing(1234|)..type(|
|00003050| 6c 69 6e 65 29 0d 09 6c | 6f 6e 67 28 43 4f 44 45 |line)..l|ong(CODE|
|00003060| 29 0d 09 68 65 78 64 28 | d2 41 20 53 74 72 69 6e |)..hexd(|.A Strin|
|00003070| 67 d3 29 0d 09 27 62 6c | 6f 62 27 28 c7 34 31 37 |g.)..'bl|ob'(.417|
|00003080| 30 37 30 36 43 36 35 c8 | 29 0d 0d 75 09 43 6f 65 |0706C65.|)..u.Coe|
|00003090| 72 63 69 6f 6e 73 20 6f | 66 20 6e 75 6d 65 72 69 |rcions o|f numeri|
|000030a0| 63 20 76 61 6c 75 65 73 | 20 61 72 65 20 65 66 66 |c values| are eff|
|000030b0| 65 63 74 65 64 20 62 79 | 20 63 61 6c 6c 69 6e 67 |ected by| calling|
|000030c0| 20 41 45 43 6f 65 72 63 | 65 44 65 73 63 3b 20 69 | AECoerc|eDesc; i|
|000030d0| 66 20 74 68 65 20 0d 63 | 6f 65 72 63 69 6f 6e 20 |f the .c|oercion |
|000030e0| 66 61 69 6c 73 2c 20 79 | 6f 75 d5 6c 6c 20 67 65 |fails, y|ou.ll ge|
|000030f0| 74 20 61 6e 20 65 72 72 | 41 45 43 6f 65 72 63 69 |t an err|AECoerci|
|00003100| 6f 6e 46 61 69 6c 20 65 | 72 72 6f 72 20 72 65 74 |onFail e|rror ret|
|00003110| 75 72 6e 65 64 20 74 6f | 20 79 6f 75 2e 20 0d 43 |urned to| you. .C|
|00003120| 6f 65 72 63 69 6f 6e 73 | 20 6f 66 20 6f 74 68 65 |oercions| of othe|
|00003130| 72 20 74 79 70 65 73 20 | 6a 75 73 74 20 72 65 70 |r types |just rep|
|00003140| 6c 61 63 65 20 74 68 65 | 20 64 65 73 63 72 69 70 |lace the| descrip|
|00003150| 74 6f 72 54 79 70 65 20 | 66 69 65 6c 64 20 6f 66 |torType |field of|
|00003160| 20 74 68 65 20 41 45 44 | 65 73 63 2e ca ca 75 0d | the AED|esc...u.|
|00003170| 0d 75 09 48 65 78 20 73 | 74 72 69 6e 67 73 20 6d |.u.Hex s|trings m|
|00003180| 75 73 74 20 62 65 20 63 | 6f 65 72 63 65 64 20 74 |ust be c|oerced t|
|00003190| 6f 20 73 6f 6d 65 74 68 | 69 6e 67 2c 20 73 69 6e |o someth|ing, sin|
|000031a0| 63 65 20 74 68 65 79 20 | 68 61 76 65 20 6e 6f 20 |ce they |have no |
|000031b0| 69 6e 74 72 69 6e 73 69 | 63 20 74 79 70 65 2e ca |intrinsi|c type..|
|000031c0| ca 75 0d 0d 59 6f 75 20 | 63 61 6e 20 61 6c 73 6f |.u..You |can also|
|000031d0| 20 63 6f 65 72 63 65 20 | 6e 6f 74 68 69 6e 67 2c | coerce |nothing,|
|000031e0| 20 74 6f 20 67 65 74 20 | 61 20 64 65 73 63 72 69 | to get |a descri|
|000031f0| 70 74 6f 72 20 77 69 74 | 68 20 7a 65 72 6f 2d 6c |ptor wit|h zero-l|
|00003200| 65 6e 67 74 68 20 64 61 | 74 61 3a 0d 0d 09 65 6d |ength da|ta:...em|
|00003210| 74 79 28 29 0d 0d 45 76 | 65 6e 20 74 68 65 20 74 |ty()..Ev|en the t|
|00003220| 79 70 65 20 63 61 6e 20 | 62 65 20 6f 6d 69 74 74 |ype can |be omitt|
|00003230| 65 64 2c 20 6c 65 61 76 | 69 6e 67 20 6a 75 73 74 |ed, leav|ing just|
|00003240| 20 28 29 2c 20 69 6e 20 | 77 68 69 63 68 20 63 61 | (), in |which ca|
|00003250| 73 65 20 74 68 65 20 74 | 79 70 65 20 69 73 20 27 |se the t|ype is '|
|00003260| 6e 75 6c 6c 27 2e 0d 0d | 4c 69 73 74 73 0d 0d 54 |null'...|Lists..T|
|00003270| 6f 20 6d 61 6b 65 20 61 | 6e 20 41 45 44 65 73 63 |o make a|n AEDesc|
|00003280| 4c 69 73 74 2c 20 6a 75 | 73 74 20 65 6e 63 6c 6f |List, ju|st enclo|
|00003290| 73 65 20 61 20 63 6f 6d | 6d 61 2d 73 65 70 61 72 |se a com|ma-separ|
|000032a0| 61 74 65 64 20 6c 69 73 | 74 20 6f 66 20 64 65 73 |ated lis|t of des|
|000032b0| 63 72 69 70 74 6f 72 73 | 20 69 6e 20 0d 73 71 75 |criptors| in .squ|
|000032c0| 61 72 65 20 62 72 61 63 | 6b 65 74 73 2e 20 46 6f |are brac|kets. Fo|
|000032d0| 72 20 65 78 61 6d 70 6c | 65 3a 0d 0d 09 5b 31 32 |r exampl|e:...[12|
|000032e0| 33 2c 20 2d 34 35 36 2c | 20 d2 65 74 20 63 65 74 |3, -456,| .et cet|
|000032f0| 65 72 61 d3 5d 0d 09 5b | 73 69 6e 67 28 31 32 33 |era.]..[|sing(123|
|00003300| 34 29 2c 20 6c 6f 6e 67 | 28 43 4f 44 45 29 2c 0d |4), long|(CODE),.|
|00003310| 09 20 5b d2 77 68 65 65 | 6c 73 d3 2c 20 d2 77 69 |. [.whee|ls., .wi|
|00003320| 74 68 69 6e 20 77 68 65 | 65 6c 73 d3 5d 5d 0d 09 |thin whe|els.]]..|
|00003330| 5b 5d 0d 0d 54 68 65 20 | 65 6c 65 6d 65 6e 74 73 |[]..The |elements|
|00003340| 20 6f 66 20 61 20 6c 69 | 73 74 20 63 61 6e 20 62 | of a li|st can b|
|00003350| 65 20 6f 66 20 64 69 66 | 66 65 72 65 6e 74 20 74 |e of dif|ferent t|
|00003360| 79 70 65 73 2c 20 61 6e | 64 20 61 20 6c 69 73 74 |ypes, an|d a list|
|00003370| 20 63 61 6e 20 63 6f 6e | 74 61 69 6e 20 6f 74 68 | can con|tain oth|
|00003380| 65 72 20 6c 69 73 74 73 | 20 6f 72 20 0d 72 65 63 |er lists| or .rec|
|00003390| 6f 72 64 73 20 28 73 65 | 65 20 62 65 6c 6f 77 29 |ords (se|e below)|
|000033a0| 20 61 73 20 65 6c 65 6d | 65 6e 74 73 2e 0d 0d 4c | as elem|ents...L|
|000033b0| 69 73 74 73 20 63 61 6e | 6e 6f 74 20 62 65 20 63 |ists can|not be c|
|000033c0| 6f 65 72 63 65 64 20 74 | 6f 20 6f 74 68 65 72 20 |oerced t|o other |
|000033d0| 74 79 70 65 73 3b 20 74 | 68 65 20 74 79 70 65 20 |types; t|he type |
|000033e0| 6f 66 20 61 20 6c 69 73 | 74 20 69 73 20 61 6c 77 |of a lis|t is alw|
|000033f0| 61 79 73 20 27 6c 69 73 | 74 27 2e 0d 0d 52 65 63 |ays 'lis|t'...Rec|
|00003400| 6f 72 64 73 0d 0d 41 6e | 20 41 45 52 65 63 6f 72 |ords..An| AERecor|
|00003410| 64 20 69 73 20 69 6e 64 | 69 63 61 74 65 64 20 62 |d is ind|icated b|
|00003420| 79 20 61 20 63 6f 6d 6d | 61 2d 73 65 70 61 72 61 |y a comm|a-separa|
|00003430| 74 65 64 20 6c 69 73 74 | 20 6f 66 20 65 6c 65 6d |ted list| of elem|
|00003440| 65 6e 74 73 20 65 6e 63 | 6c 6f 73 65 64 20 69 6e |ents enc|losed in|
|00003450| 20 63 75 72 6c 79 20 0d | 62 72 61 63 65 73 2e 20 | curly .|braces. |
|00003460| 45 61 63 68 20 65 6c 65 | 6d 65 6e 74 20 6f 66 20 |Each ele|ment of |
|00003470| 61 20 72 65 63 6f 72 64 | 20 63 6f 6e 73 69 73 74 |a record| consist|
|00003480| 73 20 6f 66 20 61 20 6b | 65 79 77 6f 72 64 20 28 |s of a k|eyword (|
|00003490| 61 20 74 79 70 65 2d 63 | 6f 64 65 2c 20 61 73 20 |a type-c|ode, as |
|000034a0| 64 65 73 63 72 69 62 65 | 64 20 0d 75 6e 64 65 72 |describe|d .under|
|000034b0| 20 42 61 73 69 63 20 54 | 79 70 65 73 29 20 66 6f | Basic T|ypes) fo|
|000034c0| 6c 6c 6f 77 65 64 20 62 | 79 20 61 20 d2 3a d3 2c |llowed b|y a .:.,|
|000034d0| 20 66 6f 6c 6c 6f 77 65 | 64 20 62 79 20 61 20 76 | followe|d by a v|
|000034e0| 61 6c 75 65 2c 20 77 68 | 69 63 68 20 63 61 6e 20 |alue, wh|ich can |
|000034f0| 62 65 20 61 6e 79 20 0d | 64 65 73 63 72 69 70 74 |be any .|descript|
|00003500| 6f 72 3a 20 61 20 62 61 | 73 69 63 20 74 79 70 65 |or: a ba|sic type|
|00003510| 2c 20 61 20 6c 69 73 74 | 20 6f 72 20 61 6e 6f 74 |, a list| or anot|
|00003520| 68 65 72 20 72 65 63 6f | 72 64 2e 20 46 6f 72 20 |her reco|rd. For |
|00003530| 65 78 61 6d 70 6c 65 3a | 0d 0d 09 7b 78 3a 31 30 |example:|...{x:10|
|00003540| 30 2c 20 79 3a 2d 31 30 | 30 7d 0d 09 7b 27 6f 72 |0, y:-10|0}..{'or|
|00003550| 69 67 69 6e 27 3a 20 7b | 78 3a 31 30 30 2c 20 79 |igin': {|x:100, y|
|00003560| 3a 2d 31 30 30 7d 2c 20 | 65 78 74 65 6e 74 3a 20 |:-100}, |extent: |
|00003570| 7b 78 3a 35 30 30 2c 20 | 79 3a 35 30 30 7d 2c 0d |{x:500, |y:500},.|
|00003580| 09 20 63 6f 6e 74 3a 20 | 5b 31 2c 20 35 2c 20 32 |. cont: |[1, 5, 2|
|00003590| 35 5d 7d 0d 09 7b 7d 0d | 0d 54 68 65 20 64 65 66 |5]}..{}.|.The def|
|000035a0| 61 75 6c 74 20 74 79 70 | 65 20 6f 66 20 61 20 72 |ault typ|e of a r|
|000035b0| 65 63 6f 72 64 20 69 73 | 20 27 72 65 63 6f 27 2e |ecord is| 'reco'.|
|000035c0| 20 20 4d 61 6e 79 20 6f | 66 20 74 68 65 20 41 70 | Many o|f the Ap|
|000035d0| 70 6c 65 20 45 76 65 6e | 74 73 20 4f 62 6a 65 63 |ple Even|ts Objec|
|000035e0| 74 20 0d 4d 6f 64 65 6c | 20 73 74 72 75 63 74 75 |t .Model| structu|
|000035f0| 72 65 73 20 61 72 65 20 | 41 45 52 65 63 6f 72 64 |res are |AERecord|
|00003600| 73 20 74 68 61 74 20 68 | 61 76 65 20 62 65 65 6e |s that h|ave been|
|00003610| 20 63 6f 65 72 63 65 64 | 20 74 6f 20 73 6f 6d 65 | coerced| to some|
|00003620| 20 6f 74 68 65 72 20 64 | 61 74 61 20 0d 74 79 70 | other d|ata .typ|
|00003630| 65 2c 20 6c 69 6b 65 20 | 27 69 6e 64 78 27 20 6f |e, like |'indx' o|
|00003640| 72 20 27 77 68 6f 73 27 | 2e 20 20 59 6f 75 20 63 |r 'whos'|. You c|
|00003650| 61 6e 20 63 6f 65 72 63 | 65 20 61 20 72 65 63 6f |an coerc|e a reco|
|00003660| 72 64 20 73 74 72 75 63 | 74 75 72 65 20 74 6f 20 |rd struc|ture to |
|00003670| 61 6e 79 20 0d 74 79 70 | 65 20 62 79 20 70 72 65 |any .typ|e by pre|
|00003680| 63 65 64 69 6e 67 20 69 | 74 20 77 69 74 68 20 61 |ceding i|t with a|
|00003690| 20 74 79 70 65 20 63 6f | 64 65 2e 20 20 46 6f 72 | type co|de. For|
|000036a0| 20 65 78 61 6d 70 6c 65 | 3a 0d 0d 09 72 61 6e 67 | example|:...rang|
|000036b0| 7b 20 73 74 61 72 3a 20 | 35 2c 20 73 74 6f 70 3a |{ star: |5, stop:|
|000036c0| 20 36 7d 0d 0d 73 20 57 | 61 72 6e 69 6e 67 20 43 | 6}..s W|arning C|
|000036d0| 6f 65 72 63 69 6e 67 20 | 74 6f 20 61 6e 20 65 78 |oercing |to an ex|
|000036e0| 69 73 74 69 6e 67 20 74 | 79 70 65 2c 20 73 75 63 |isting t|ype, suc|
|000036f0| 68 20 61 73 20 27 62 6f | 6f 6c 27 20 6f 72 20 27 |h as 'bo|ol' or '|
|00003700| 54 45 58 54 27 2c 20 69 | 73 20 61 20 0d 62 61 64 |TEXT', i|s a .bad|
|00003710| 20 69 64 65 61 2e 20 20 | 41 6e 79 6f 6e 65 20 70 | idea. |Anyone p|
|00003720| 61 72 73 69 6e 67 20 74 | 68 65 20 64 65 73 63 72 |arsing t|he descr|
|00003730| 69 70 74 6f 72 20 28 69 | 6e 63 6c 75 64 69 6e 67 |iptor (i|ncluding|
|00003740| 20 41 45 50 72 69 6e 74 | 29 20 77 69 6c 6c 20 0d | AEPrint|) will .|
|00003750| 72 65 63 6f 67 6e 69 7a | 65 20 74 68 65 20 74 79 |recogniz|e the ty|
|00003760| 70 65 20 61 6e 64 20 61 | 73 73 75 6d 65 20 74 68 |pe and a|ssume th|
|00003770| 61 74 20 74 68 65 20 64 | 61 74 61 20 68 61 73 20 |at the d|ata has |
|00003780| 74 68 65 20 6e 6f 72 6d | 61 6c 20 0d 69 6e 74 65 |the norm|al .inte|
|00003790| 72 70 72 65 74 61 74 69 | 6f 6e 2c 20 77 68 69 63 |rpretati|on, whic|
|000037a0| 68 20 69 6e 20 74 68 69 | 73 20 63 61 73 65 20 69 |h in thi|s case i|
|000037b0| 74 20 77 6f 75 6c 64 6e | d5 74 2e 20 20 42 61 64 |t wouldn|.t. Bad|
|000037c0| 20 74 6f 20 61 77 66 75 | 6c 20 74 68 69 6e 67 73 | to awfu|l things|
|000037d0| 20 0d 77 6f 75 6c 64 20 | 68 61 70 70 65 6e 2e 20 | .would |happen. |
|000037e0| 20 44 6f 6e d5 74 20 64 | 6f 20 69 74 2e 0d 0d 41 | Don.t d|o it...A|
|000037f0| 70 70 6c 65 20 45 76 65 | 6e 74 73 0d 0d 54 68 65 |pple Eve|nts..The|
|00003800| 20 73 79 6e 74 61 78 20 | 6f 66 20 74 68 65 20 66 | syntax |of the f|
|00003810| 6f 72 6d 61 74 74 69 6e | 67 20 73 74 72 69 6e 67 |ormattin|g string|
|00003820| 20 66 6f 72 20 61 6e 20 | 65 6e 74 69 72 65 20 41 | for an |entire A|
|00003830| 70 70 6c 65 20 65 76 65 | 6e 74 20 28 61 73 20 70 |pple eve|nt (as p|
|00003840| 61 73 73 65 64 20 74 6f | 20 0d 41 45 42 75 69 6c |assed to| .AEBuil|
|00003850| 64 41 70 70 6c 65 45 76 | 65 6e 74 29 20 69 73 20 |dAppleEv|ent) is |
|00003860| 61 6c 6d 6f 73 74 20 69 | 64 65 6e 74 69 63 61 6c |almost i|dentical|
|00003870| 20 74 6f 20 74 68 61 74 | 20 6f 66 20 61 20 72 65 | to that| of a re|
|00003880| 63 6f 72 64 2e 20 45 61 | 63 68 20 6b 65 79 65 64 |cord. Ea|ch keyed|
|00003890| 20 65 6c 65 6d 65 6e 74 | 20 0d 73 70 65 63 69 66 | element| .specif|
|000038a0| 69 65 64 20 69 6e 20 74 | 68 65 20 73 74 72 69 6e |ied in t|he strin|
|000038b0| 67 20 62 65 63 6f 6d 65 | 73 20 61 20 70 61 72 61 |g become|s a para|
|000038c0| 6d 65 74 65 72 20 6f 72 | 20 61 74 74 72 69 62 75 |meter or| attribu|
|000038d0| 74 65 20 6f 66 20 74 68 | 65 20 65 76 65 6e 74 2e |te of th|e event.|
|000038e0| 20 54 68 65 20 0d 64 69 | 66 66 65 72 65 6e 63 65 | The .di|fference|
|000038f0| 73 20 61 72 65 3a 0d 0d | a5 09 54 68 65 72 65 20 |s are:..|..There |
|00003900| 61 72 65 20 6e 6f 20 63 | 75 72 6c 79 2d 62 72 61 |are no c|urly-bra|
|00003910| 63 65 73 20 61 74 20 74 | 68 65 20 62 65 67 69 6e |ces at t|he begin|
|00003920| 6e 69 6e 67 20 61 6e 64 | 20 65 6e 64 20 6f 66 20 |ning and| end of |
|00003930| 74 68 65 20 73 74 72 69 | 6e 67 2e 0d a5 09 54 68 |the stri|ng....Th|
|00003940| 65 20 63 68 61 72 61 63 | 74 65 72 20 d2 7e d3 20 |e charac|ter .~. |
|00003950| 62 65 66 6f 72 65 20 61 | 20 70 61 72 61 6d 65 74 |before a| paramet|
|00003960| 65 72 20 6b 65 79 77 6f | 72 64 20 6d 61 6b 65 73 |er keywo|rd makes|
|00003970| 20 69 74 20 6f 70 74 69 | 6f 6e 61 6c 2e 0d 0d 48 | it opti|onal...H|
|00003980| 65 72 65 d5 73 20 61 6e | 20 65 78 61 6d 70 6c 65 |ere.s an| example|
|00003990| 20 6f 66 20 68 6f 77 20 | 74 6f 20 63 6f 6e 73 74 | of how |to const|
|000039a0| 72 75 63 74 20 61 6e 20 | 4f 70 65 6e 20 53 65 6c |ruct an |Open Sel|
|000039b0| 65 63 74 69 6f 6e 20 65 | 76 65 6e 74 20 66 6f 72 |ection e|vent for|
|000039c0| 20 74 68 65 20 46 69 6e | 64 65 72 3a 0d 0d 09 41 | the Fin|der:...A|
|000039d0| 6c 69 61 73 48 61 6e 64 | 6c 65 20 70 61 72 65 6e |liasHand|le paren|
|000039e0| 74 2c 20 69 74 65 6d 54 | 6f 4f 70 65 6e 3b 0d 09 |t, itemT|oOpen;..|
|000039f0| 63 6f 6e 73 74 20 4f 53 | 54 79 70 65 20 66 69 6e |const OS|Type fin|
|00003a00| 64 65 72 53 69 67 6e 61 | 74 75 72 65 20 3d 20 27 |derSigna|ture = '|
|00003a10| 4d 41 43 53 27 3b 0d 09 | 41 70 70 6c 65 45 76 65 |MACS';..|AppleEve|
|00003a20| 6e 74 20 65 76 65 6e 74 | 3b 0d 09 4f 53 45 72 72 |nt event|;..OSErr|
|00003a30| 20 65 72 72 3b 0d 0d 09 | 2f 2f 20 43 6f 6e 73 74 | err;...|// Const|
|00003a40| 72 75 63 74 20 74 68 65 | 20 61 6c 69 61 73 65 73 |ruct the| aliases|
|00003a50| 20 68 65 72 65 20 28 6e | 6f 74 20 73 68 6f 77 6e | here (n|ot shown|
|00003a60| 29 0d 0d 09 65 72 72 3d | 20 41 45 42 75 69 6c 64 |)...err=| AEBuild|
|00003a70| 45 70 70 6c 65 45 76 65 | 6e 74 28 0d 09 09 09 27 |EppleEve|nt(....'|
|00003a80| 46 4e 44 52 27 2c 20 27 | 53 4f 50 45 27 2c 0d 09 |FNDR', '|SOPE',..|
|00003a90| 09 09 74 79 70 65 41 70 | 70 6c 53 69 67 6e 61 74 |..typeAp|plSignat|
|00003aa0| 75 72 65 2c 20 40 66 69 | 6e 64 65 72 53 69 67 6e |ure, @fi|nderSign|
|00003ab0| 61 74 75 72 65 2c 20 73 | 69 7a 65 6f 66 28 66 69 |ature, s|izeof(fi|
|00003ac0| 6e 64 65 72 53 69 67 6e | 61 74 75 72 65 29 2c 0d |nderSign|ature),.|
|00003ad0| 09 09 09 6b 41 75 74 6f | 47 65 6e 65 72 61 74 65 |...kAuto|Generate|
|00003ae0| 52 65 74 75 72 6e 49 44 | 2c 20 6b 41 6e 79 54 72 |ReturnID|, kAnyTr|
|00003af0| 61 6e 73 61 63 74 69 6f | 6e 49 44 2c 0d 09 09 09 |ansactio|nID,....|
|00003b00| 26 65 76 65 6e 74 2c 09 | 09 09 09 09 09 09 09 09 |&event,.|........|
|00003b10| 09 2f 2f 20 45 76 65 6e | 74 20 74 6f 20 62 65 20 |.// Even|t to be |
|00003b20| 63 72 65 61 74 65 64 0d | 09 09 09 22 2d 2d 2d 2d |created.|..."----|
|00003b30| 3a 20 61 6c 69 73 28 40 | 40 29 2c 20 66 73 65 6c |: alis(@|@), fsel|
|00003b40| 3a 20 5b 61 6c 69 73 28 | 40 40 29 5d 22 2c 09 09 |: [alis(|@@)]",..|
|00003b50| 09 2f 2f 20 46 6f 72 6d | 61 74 20 73 74 72 69 6e |.// Form|at strin|
|00003b60| 67 0d 09 09 09 09 70 61 | 72 65 6e 74 2c 09 09 09 |g.....pa|rent,...|
|00003b70| 09 09 09 09 09 09 2f 2f | 20 70 61 72 61 6d 20 66 |......//| param f|
|00003b80| 6f 72 20 31 73 74 20 40 | 40 0d 09 09 09 09 69 74 |or 1st @|@.....it|
|00003b90| 65 6d 54 6f 4f 70 65 6e | 09 09 09 09 09 09 09 09 |emToOpen|........|
|00003ba0| 2f 2f 20 70 61 72 61 6d | 20 66 6f 72 20 32 6e 64 |// param| for 2nd|
|00003bb0| 20 40 40 0d 09 29 3b 0d | 09 0d 53 75 62 73 74 69 | @@..);.|..Substi|
|00003bc0| 74 75 74 69 6e 67 20 50 | 61 72 61 6d 65 74 65 72 |tuting P|arameter|
|00003bd0| 73 0d 0d 54 6f 20 70 6c | 75 67 20 79 6f 75 72 20 |s..To pl|ug your |
|00003be0| 6f 77 6e 20 76 61 6c 75 | 65 73 20 69 6e 74 6f 20 |own valu|es into |
|00003bf0| 74 68 65 20 6d 69 64 73 | 74 20 6f 66 20 61 20 64 |the mids|t of a d|
|00003c00| 65 73 63 72 69 70 74 6f | 72 2c 20 75 73 65 20 74 |escripto|r, use t|
|00003c10| 68 65 20 6d 61 67 69 63 | 20 d2 40 d3 20 0d 63 68 |he magic| .@. .ch|
|00003c20| 61 72 61 63 74 65 72 2e | 20 59 6f 75 20 63 61 6e |aracter.| You can|
|00003c30| 20 75 73 65 20 d2 40 d3 | 20 61 6e 79 77 68 65 72 | use .@.| anywher|
|00003c40| 65 20 79 6f 75 20 63 61 | 6e 20 70 75 74 20 61 20 |e you ca|n put a |
|00003c50| 62 61 73 69 63 20 65 6c | 65 6d 65 6e 74 20 6c 69 |basic el|ement li|
|00003c60| 6b 65 20 61 6e 20 69 6e | 74 65 67 65 72 2e 20 0d |ke an in|teger. .|
|00003c70| 45 61 63 68 20 d2 40 d3 | 20 69 73 20 72 65 70 6c |Each .@.| is repl|
|00003c80| 61 63 65 64 20 62 79 20 | 61 20 76 61 6c 75 65 20 |aced by |a value |
|00003c90| 74 61 6b 65 6e 20 66 72 | 6f 6d 20 74 68 65 20 70 |taken fr|om the p|
|00003ca0| 61 72 61 6d 65 74 65 72 | 20 6c 69 73 74 20 73 65 |arameter| list se|
|00003cb0| 6e 74 20 74 6f 20 74 68 | 65 20 41 45 42 75 69 6c |nt to th|e AEBuil|
|00003cc0| 64 20 0d 66 75 6e 63 74 | 69 6f 6e 2e 20 54 68 65 |d .funct|ion. The|
|00003cd0| 20 74 79 70 65 20 6f 66 | 20 76 61 6c 75 65 20 63 | type of| value c|
|00003ce0| 72 65 61 74 65 64 20 64 | 65 70 65 6e 64 73 20 6f |reated d|epends o|
|00003cf0| 6e 20 74 68 65 20 63 6f | 6e 74 65 78 74 20 69 6e |n the co|ntext in|
|00003d00| 20 77 68 69 63 68 20 74 | 68 65 20 d2 40 d3 20 69 | which t|he .@. i|
|00003d10| 73 20 0d 75 73 65 64 3a | 20 69 6e 20 70 61 72 74 |s .used:| in part|
|00003d20| 69 63 75 6c 61 72 2c 20 | 68 6f 77 20 69 74 d5 73 |icular, |how it.s|
|00003d30| 20 63 6f 65 72 63 65 64 | 2e 0d 0d 54 79 70 65 20 | coerced|...Type |
|00003d40| 43 6f 65 72 63 65 64 20 | 74 6f 3a 09 54 79 70 65 |Coerced |to:.Type|
|00003d50| 20 6f 66 20 66 6e 20 70 | 61 72 61 6d 65 74 65 72 | of fn p|arameter|
|00003d60| 20 72 65 61 64 3a 09 09 | 09 43 6f 6d 6d 65 6e 74 | read:..|.Comment|
|00003d70| 73 3a 0d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |s:.-----|--------|
|00003d80| 2d 2d 2d 09 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |---.----|--------|
|00003d90| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 09 09 |--------|------..|
|00003da0| 09 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0d 4e 6f 20 63 6f |.-------|--.No co|
|00003db0| 65 72 63 69 6f 6e 09 09 | 09 41 45 44 65 73 63 2a |ercion..|.AEDesc*|
|00003dc0| 09 09 09 09 09 09 09 09 | 41 20 70 6c 61 69 6e 20 |........|A plain |
|00003dd0| d2 40 d3 20 77 69 6c 6c | 20 62 65 20 72 65 70 6c |.@. will| be repl|
|00003de0| 61 63 65 64 20 77 69 74 | 68 20 61 0d 09 09 09 09 |aced wit|h a.....|
|00003df0| 09 09 09 09 09 09 09 09 | 09 09 64 65 73 63 72 69 |........|..descri|
|00003e00| 70 74 6f 72 20 70 61 72 | 61 6d 65 74 65 72 2e 0d |ptor par|ameter..|
|00003e10| 09 09 09 09 09 09 09 09 | 09 09 09 09 09 09 0d 4e |........|.......N|
|00003e20| 75 6d 65 72 69 63 20 09 | 09 09 28 62 6f 6f 6c 2c |umeric .|..(bool,|
|00003e30| 20 73 68 6f 72 2c 0d 09 | 09 09 09 09 6c 6f 6e 67 | shor,..|....long|
|00003e40| 2c 20 73 69 6e 67 2c 20 | 64 6f 75 62 2c 20 65 78 |, sing, |doub, ex|
|00003e50| 74 65 29 09 73 68 6f 72 | 74 2c 20 73 68 6f 72 74 |te).shor|t, short|
|00003e60| 2c 20 6c 6f 6e 67 2c 20 | 66 6c 6f 61 74 2c 0d 09 |, long, |float,..|
|00003e70| 09 09 09 09 73 68 6f 72 | 74 20 64 6f 75 62 6c 65 |....shor|t double|
|00003e80| 2c 20 64 6f 75 62 6c 65 | 09 09 09 09 52 65 6d 65 |, double|....Reme|
|00003e90| 6d 62 65 72 20 74 68 61 | 74 20 54 48 49 4e 4b 20 |mber tha|t THINK |
|00003ea0| 43 d5 73 20 64 6f 75 62 | 6c 65 0d 09 09 09 09 09 |C.s doub|le......|
|00003eb0| 09 09 09 09 09 09 09 09 | 09 63 6f 72 72 65 73 70 |........|.corresp|
|00003ec0| 6f 6e 64 73 20 74 6f 20 | 74 79 70 65 20 27 65 78 |onds to |type 'ex|
|00003ed0| 74 65 27 21 0d 09 09 09 | 09 09 09 09 09 09 09 09 |te'!....|........|
|00003ee0| 09 09 09 0d 54 45 58 54 | 09 09 09 09 63 68 61 72 |....TEXT|....char|
|00003ef0| 2a 09 09 09 09 09 09 09 | 09 50 6f 69 6e 74 65 72 |*.......|.Pointer|
|00003f00| 20 74 6f 20 61 20 6e 75 | 6c 6c 2d 74 65 72 6d 69 | to a nu|ll-termi|
|00003f10| 6e 61 74 65 64 20 43 20 | 73 74 72 69 6e 67 2e 0d |nated C |string..|
|00003f20| 0d 41 6e 79 20 6f 74 68 | 65 72 20 74 79 70 65 09 |.Any oth|er type.|
|00003f30| 09 6c 6f 6e 67 20 66 6f | 6c 6c 6f 77 65 64 20 62 |.long fo|llowed b|
|00003f40| 79 20 76 6f 69 64 2a 09 | 09 09 09 45 78 70 65 63 |y void*.|...Expec|
|00003f50| 74 73 20 61 20 6c 65 6e | 67 74 68 20 70 61 72 61 |ts a len|gth para|
|00003f60| 6d 65 74 65 72 20 66 6f | 6c 6c 6f 77 65 64 20 62 |meter fo|llowed b|
|00003f70| 79 0d 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |y.......|........|
|00003f80| 61 20 70 6f 69 6e 74 65 | 72 20 74 6f 20 74 68 65 |a pointe|r to the|
|00003f90| 20 64 65 73 63 72 69 70 | 74 6f 72 20 64 61 74 61 | descrip|tor data|
|00003fa0| 2e 0d 09 09 09 09 09 09 | 09 09 09 09 09 09 09 09 |........|........|
|00003fb0| 0d 73 09 49 6d 70 6f 72 | 74 61 6e 74 09 4e 6f 74 |.s.Impor|tant.Not|
|00003fc0| 65 20 70 61 72 74 69 63 | 75 6c 61 72 6c 79 3a 20 |e partic|ularly: |
|00003fd0| 74 68 61 74 20 54 45 58 | 54 20 70 61 72 61 6d 65 |that TEX|T parame|
|00003fe0| 74 65 72 73 20 6d 75 73 | 74 20 62 65 20 6e 75 6c |ters mus|t be nul|
|00003ff0| 6c 2d 74 65 72 6d 69 6e | 61 74 65 64 20 0d 73 74 |l-termin|ated .st|
|00004000| 72 69 6e 67 73 2c 20 61 | 6c 74 68 6f 75 67 68 20 |rings, a|lthough |
|00004010| 74 68 65 20 72 65 73 75 | 6c 74 69 6e 67 20 64 65 |the resu|lting de|
|00004020| 73 63 72 69 70 74 6f 72 | 20 64 61 74 61 20 77 69 |scriptor| data wi|
|00004030| 6c 6c 20 6e 6f 74 20 62 | 65 20 6e 75 6c 6c 2d 0d |ll not b|e null-.|
|00004040| 74 65 72 6d 69 6e 61 74 | 65 64 3b 20 61 6e 64 20 |terminat|ed; and |
|00004050| 74 68 61 74 20 74 68 65 | 20 67 65 6e 65 72 61 6c |that the| general|
|00004060| 20 63 61 73 65 20 65 78 | 70 65 63 74 73 20 74 77 | case ex|pects tw|
|00004070| 6f 20 70 61 72 61 6d 65 | 74 65 72 73 3a 20 74 68 |o parame|ters: th|
|00004080| 65 20 0d 64 61 74 61 d5 | 73 20 73 69 7a 65 20 61 |e .data.|s size a|
|00004090| 6e 64 20 6c 6f 63 61 74 | 69 6f 6e 2e 20 ca ca 73 |nd locat|ion. ..s|
|000040a0| 0d 0d 49 6e 20 61 64 64 | 69 74 69 6f 6e 2c 20 79 |..In add|ition, y|
|000040b0| 6f 75 20 63 61 6e 20 73 | 75 62 73 74 69 74 75 74 |ou can s|ubstitut|
|000040c0| 65 20 64 61 74 61 20 66 | 72 6f 6d 20 61 20 68 61 |e data f|rom a ha|
|000040d0| 6e 64 6c 65 20 62 79 20 | 75 73 69 6e 67 20 74 77 |ndle by |using tw|
|000040e0| 6f 20 40 20 73 69 67 6e | 73 2e 20 41 6e 20 d2 40 |o @ sign|s. An .@|
|000040f0| 40 d3 20 0d 70 61 72 61 | 6d 65 74 65 72 20 77 69 |@. .para|meter wi|
|00004100| 6c 6c 20 72 65 61 64 20 | 61 20 73 69 6e 67 6c 65 |ll read |a single|
|00004110| 20 68 61 6e 64 6c 65 20 | 66 72 6f 6d 20 74 68 65 | handle |from the|
|00004120| 20 70 61 72 61 6d 65 74 | 65 72 20 6c 69 73 74 20 | paramet|er list |
|00004130| 61 6e 64 20 75 73 65 20 | 74 68 65 20 64 61 74 61 |and use |the data|
|00004140| 20 0d 70 6f 69 6e 74 65 | 64 20 74 6f 20 62 79 20 | .pointe|d to by |
|00004150| 74 68 61 74 20 68 61 6e | 64 6c 65 20 61 73 20 74 |that han|dle as t|
|00004160| 68 65 20 76 61 6c 75 65 | 20 6f 66 20 74 68 65 20 |he value| of the |
|00004170| 64 65 73 63 72 69 70 74 | 6f 72 2e 20 54 68 65 20 |descript|or. The |
|00004180| d2 40 40 d3 20 6d 75 73 | 74 20 62 65 20 0d 63 6f |.@@. mus|t be .co|
|00004190| 65 72 63 65 64 20 73 6f | 20 74 68 61 74 20 41 45 |erced so| that AE|
|000041a0| 42 75 69 6c 64 20 77 69 | 6c 6c 20 6b 6e 6f 77 20 |Build wi|ll know |
|000041b0| 77 68 61 74 20 74 79 70 | 65 20 74 6f 20 6d 61 6b |what typ|e to mak|
|000041c0| 65 20 74 68 65 20 64 65 | 73 63 72 69 70 74 6f 72 |e the de|scriptor|
|000041d0| 3b 20 68 6f 77 65 76 65 | 72 2c 20 0d 74 68 65 20 |; howeve|r, .the |
|000041e0| 74 79 70 65 20 63 6f 65 | 72 63 65 64 20 74 6f 20 |type coe|rced to |
|000041f0| 63 61 6e 20 62 65 20 61 | 6e 79 74 68 69 6e 67 20 |can be a|nything |
|00004200| 28 74 68 65 20 74 61 62 | 6c 65 20 61 62 6f 76 65 |(the tab|le above|
|00004210| 20 69 73 20 69 67 6e 6f | 72 65 64 2e 29 0d 0d 54 | is igno|red.)..T|
|00004220| 68 69 73 20 6d 65 63 68 | 61 6e 69 73 6d 20 69 73 |his mech|anism is|
|00004230| 20 73 74 69 6c 6c 20 61 | 20 62 69 74 20 6c 69 6d | still a| bit lim|
|00004240| 69 74 65 64 2c 20 61 6e | 64 20 6d 61 79 20 77 65 |ited, an|d may we|
|00004250| 6c 6c 20 62 65 20 69 6d | 70 72 6f 76 65 64 20 69 |ll be im|proved i|
|00004260| 6e 20 74 68 65 20 66 75 | 74 75 72 65 2e 0d 0d 44 |n the fu|ture...D|
|00004270| 65 73 63 72 69 70 74 6f | 72 2d 53 74 72 69 6e 67 |escripto|r-String|
|00004280| 20 47 72 61 6d 6d 61 72 | 0d 2d 2d 2d 2d 2d 2d 2d | Grammar|.-------|
|00004290| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000042a0| 2d 2d 0d 0d 53 69 6e 63 | 65 20 6e 6f 20 6c 61 6e |--..Sinc|e no lan|
|000042b0| 67 75 61 67 65 2c 20 68 | 6f 77 65 76 65 72 20 73 |guage, h|owever s|
|000042c0| 6d 61 6c 6c 2c 20 63 61 | 6e 20 62 65 20 74 61 6b |mall, ca|n be tak|
|000042d0| 65 6e 20 73 65 72 69 6f | 75 73 6c 79 20 75 6e 6c |en serio|usly unl|
|000042e0| 65 73 73 20 69 74 20 63 | 6f 6d 65 73 20 66 75 6c |ess it c|omes ful|
|000042f0| 6c 79 20 0d 65 71 75 69 | 70 70 65 64 20 77 69 74 |ly .equi|pped wit|
|00004300| 68 20 61 20 66 6f 72 6d | 69 64 61 62 6c 65 2d 6c |h a form|idable-l|
|00004310| 6f 6f 6b 69 6e 67 20 42 | 4e 46 20 67 72 61 6d 6d |ooking B|NF gramm|
|00004320| 61 72 20 73 70 65 63 69 | 66 69 63 61 74 69 6f 6e |ar speci|fication|
|00004330| 2c 20 49 20 68 65 72 65 | 20 70 72 65 73 65 6e 74 |, I here| present|
|00004340| 20 0d 6f 6e 65 2e 20 4e | 6f 20 61 74 74 65 6d 70 | .one. N|o attemp|
|00004350| 74 20 68 61 73 20 62 65 | 65 6e 20 6d 61 64 65 20 |t has be|en made |
|00004360| 74 6f 20 70 72 65 76 65 | 6e 74 20 4d 65 73 73 72 |to preve|nt Messr|
|00004370| 73 2e 20 42 61 63 6b 75 | 73 20 61 6e 64 2f 6f 72 |s. Backu|s and/or|
|00004380| 20 4e 61 75 72 20 66 72 | 6f 6d 20 0d 72 6f 6c 6c | Naur fr|om .roll|
|00004390| 69 6e 67 20 6f 76 65 72 | 20 69 6e 20 74 68 65 69 |ing over| in thei|
|000043a0| 72 20 72 65 73 70 65 63 | 74 69 76 65 20 67 72 61 |r respec|tive gra|
|000043b0| 76 65 73 2e 0d 0d 43 68 | 61 72 61 63 74 65 72 20 |ves...Ch|aracter |
|000043c0| 43 6c 61 73 73 69 66 69 | 63 61 74 69 6f 6e 3a 0d |Classifi|cation:.|
|000043d0| 0d 77 68 69 74 65 73 70 | 61 63 65 09 d4 20 d5 2c |.whitesp|ace.. .,|
|000043e0| 20 d4 5c 72 d5 2c 20 d4 | 5c 6e d5 2c 20 d4 5c 74 | .\r., .|\n., .\t|
|000043f0| d5 0d 64 69 67 69 74 09 | 30 20 c9 20 39 0d 70 61 |..digit.|0 . 9.pa|
|00004400| 72 65 6e 2c 20 62 72 61 | 63 6b 65 74 2c 0d 62 72 |ren, bra|cket,.br|
|00004410| 61 63 65 73 09 28 2c 20 | 29 2c 20 5b 2c 20 5d 2c |aces.(, |), [, ],|
|00004420| 20 7b 2c 20 7d 0d 73 69 | 6e 67 6c 65 2d 71 75 6f | {, }.si|ngle-quo|
|00004430| 74 65 09 27 0d 64 6f 75 | 62 6c 65 20 71 75 6f 74 |te.'.dou|ble quot|
|00004440| 65 73 09 d2 2c 20 d3 0d | 68 65 78 20 71 75 6f 74 |es.., ..|hex quot|
|00004450| 65 73 09 c7 2c 20 c8 0d | 63 6f 6c 6f 6e 09 3a 0d |es.., ..|colon.:.|
|00004460| 63 6f 6d 6d 61 09 2c 0d | 61 74 2d 73 69 67 6e 09 |comma.,.|at-sign.|
|00004470| 40 0d 69 64 65 6e 74 63 | 68 61 72 09 61 6e 79 20 |@.identc|har.any |
|00004480| 6f 74 68 65 72 20 70 72 | 69 6e 74 61 62 6c 65 20 |other pr|intable |
|00004490| 63 68 61 72 61 63 74 65 | 72 0d 0d 54 6f 6b 65 6e |characte|r..Token|
|000044a0| 73 3a 0d 0d 69 64 65 6e | 74 20 3a 3a 3d 09 69 64 |s:..iden|t ::=.id|
|000044b0| 65 6e 74 63 68 61 72 20 | 28 69 64 65 6e 74 63 68 |entchar |(identch|
|000044c0| 61 72 20 7c 20 64 69 67 | 69 74 29 2a 09 d1 50 61 |ar | dig|it)*..Pa|
|000044d0| 64 64 65 64 2f 74 72 75 | 6e 63 61 74 65 64 0d 09 |dded/tru|ncated..|
|000044e0| 27 20 63 68 61 72 61 63 | 74 65 72 2a 20 27 09 74 |' charac|ter* '.t|
|000044f0| 6f 20 65 78 61 63 74 6c | 79 20 34 20 63 68 61 72 |o exactl|y 4 char|
|00004500| 73 0d 69 6e 74 65 67 65 | 72 20 3a 3a 3d 09 5b 20 |s.intege|r ::=.[ |
|00004510| 2d 20 5d 20 64 69 67 69 | 74 2b 09 d1 4a 75 73 74 |- ] digi|t+..Just|
|00004520| 20 61 73 20 69 6e 20 43 | 0d 73 74 72 69 6e 67 20 | as in C|.string |
|00004530| 3a 3a 3d 09 d2 20 28 63 | 68 61 72 61 63 74 65 72 |::=.. (c|haracter|
|00004540| 29 2a 20 d3 0d 68 65 78 | 73 74 72 69 6e 67 20 3a |)* ..hex|string :|
|00004550| 3a 3d 09 c7 20 28 68 65 | 78 64 69 67 69 74 20 7c |:=.. (he|xdigit ||
|00004560| 20 77 68 69 74 65 73 70 | 61 63 65 29 2a 20 c8 09 | whitesp|ace)* ..|
|00004570| d1 45 76 65 6e 20 6e 6f | 2e 20 6f 66 20 64 69 67 |.Even no|. of dig|
|00004580| 69 74 73 2c 20 70 6c 65 | 61 73 65 0d 0d 47 72 61 |its, ple|ase..Gra|
|00004590| 6d 6d 61 72 20 52 75 6c | 65 73 20 66 6f 72 20 41 |mmar Rul|es for A|
|000045a0| 45 42 75 69 6c 64 3a 0d | 0d 66 6f 72 6d 61 74 73 |EBuild:.|.formats|
|000045b0| 74 72 69 6e 67 20 3a 3a | 3d 09 6f 62 6a 09 d1 54 |tring ::|=.obj..T|
|000045c0| 68 69 73 20 69 73 20 74 | 68 65 20 74 6f 70 20 6c |his is t|he top l|
|000045d0| 65 76 65 6c 20 6f 66 20 | 73 79 6e 74 61 78 0d 6f |evel of |syntax.o|
|000045e0| 62 6a 20 3a 3a 3d 09 64 | 61 74 61 09 d1 53 69 6e |bj ::=.d|ata..Sin|
|000045f0| 67 6c 65 20 41 45 44 65 | 73 63 3b 20 73 68 6f 72 |gle AEDe|sc; shor|
|00004600| 74 63 75 74 20 66 6f 72 | 20 28 64 61 74 61 29 0d |tcut for| (data).|
|00004610| 09 73 74 72 75 63 74 75 | 72 65 09 d1 55 6e 2d 63 |.structu|re..Un-c|
|00004620| 6f 65 72 63 65 64 20 73 | 74 72 75 63 74 75 72 65 |oerced s|tructure|
|00004630| 0d 09 69 64 65 6e 74 20 | 73 74 72 75 63 74 75 72 |..ident |structur|
|00004640| 65 09 d1 43 6f 65 72 63 | 65 64 20 74 6f 20 73 6f |e..Coerc|ed to so|
|00004650| 6d 65 20 6f 74 68 65 72 | 20 74 79 70 65 0d 73 74 |me other| type.st|
|00004660| 72 75 63 74 75 72 65 20 | 3a 3a 3d 09 28 20 64 61 |ructure |::=.( da|
|00004670| 74 61 20 29 09 d1 53 69 | 6e 67 6c 65 20 41 45 44 |ta )..Si|ngle AED|
|00004680| 65 73 63 0d 09 5b 20 6f | 62 6a 65 63 74 6c 69 73 |esc..[ o|bjectlis|
|00004690| 74 20 5d 09 d1 41 45 4c | 69 73 74 20 74 79 70 65 |t ]..AEL|ist type|
|000046a0| 0d 09 7b 20 6b 65 79 77 | 6f 72 64 6c 69 73 74 20 |..{ keyw|ordlist |
|000046b0| 7d 09 d1 41 45 52 65 63 | 6f 72 64 20 74 79 70 65 |}..AERec|ord type|
|000046c0| 0d 6f 62 6a 65 63 74 6c | 69 73 74 20 3a 3a 3d 09 |.objectl|ist ::=.|
|000046d0| c7 62 6c 61 6e 6b c8 09 | d1 43 6f 6d 6d 61 2d 73 |.blank..|.Comma-s|
|000046e0| 65 70 61 72 61 74 65 64 | 20 6c 69 73 74 20 6f 66 |eparated| list of|
|000046f0| 20 74 68 69 6e 67 73 0d | 09 6f 62 6a 20 5b 20 2c | things.|.obj [ ,|
|00004700| 20 6f 62 6a 20 5d 2a 0d | 6b 65 79 77 6f 72 64 70 | obj ]*.|keywordp|
|00004710| 61 69 72 20 3a 3a 3d 09 | 69 64 65 6e 74 20 3a 20 |air ::=.|ident : |
|00004720| 6f 62 6a 09 d1 4b 65 79 | 77 6f 72 64 2f 76 61 6c |obj..Key|word/val|
|00004730| 75 65 20 70 61 69 72 0d | 6b 65 79 77 6f 72 64 6c |ue pair.|keywordl|
|00004740| 69 73 74 20 3a 3a 3d 09 | c7 62 6c 61 6e 6b c8 09 |ist ::=.|.blank..|
|00004750| d1 4c 69 73 74 20 6f 66 | 20 73 61 69 64 20 70 61 |.List of| said pa|
|00004760| 69 72 73 0d 09 6b 65 79 | 77 6f 72 64 70 61 69 72 |irs..key|wordpair|
|00004770| 20 5b 20 2c 20 6b 65 79 | 77 6f 72 64 70 61 69 72 | [ , key|wordpair|
|00004780| 20 5d 2a 0d 64 61 74 61 | 20 3a 3a 3d 09 40 09 d1 | ]*.data| ::=.@..|
|00004790| 47 65 74 73 20 61 70 70 | 72 6f 70 72 69 61 74 65 |Gets app|ropriate|
|000047a0| 20 64 61 74 61 20 66 72 | 6f 6d 20 66 6e 20 70 61 | data fr|om fn pa|
|000047b0| 72 61 6d 0d 09 69 6e 74 | 65 67 65 72 09 d1 27 73 |ram..int|eger..'s|
|000047c0| 68 6f 72 27 20 6f 72 20 | 27 6c 6f 6e 67 27 20 75 |hor' or |'long' u|
|000047d0| 6e 6c 65 73 73 20 63 6f | 65 72 63 65 64 0d 09 69 |nless co|erced..i|
|000047e0| 64 65 6e 74 09 d1 41 20 | 34 2d 63 68 61 72 20 74 |dent..A |4-char t|
|000047f0| 79 70 65 20 63 6f 64 65 | 20 28 27 74 79 70 65 27 |ype code| ('type'|
|00004800| 29 20 75 6e 6c 65 73 73 | 20 63 6f 65 72 63 65 64 |) unless| coerced|
|00004810| 0d 09 73 74 72 69 6e 67 | 09 d1 55 6e 74 65 72 6d |..string|..Unterm|
|00004820| 69 6e 61 74 65 64 20 74 | 65 78 74 3b 20 27 54 45 |inated t|ext; 'TE|
|00004830| 58 54 27 20 74 79 70 65 | 20 75 6e 6c 65 73 73 20 |XT' type| unless |
|00004840| 63 6f 65 72 63 65 64 0d | 09 68 65 78 73 74 72 69 |coerced.|.hexstri|
|00004850| 6e 67 09 d1 52 61 77 20 | 68 65 78 20 64 61 74 61 |ng..Raw |hex data|
|00004860| 3b 20 6d 75 73 74 20 62 | 65 20 63 6f 65 72 63 65 |; must b|e coerce|
|00004870| 64 20 74 6f 20 73 6f 6d | 65 20 74 79 70 65 21 0d |d to som|e type!.|
|00004880| 09 0d 47 72 61 6d 6d 61 | 72 20 52 75 6c 65 73 20 |..Gramma|r Rules |
|00004890| 66 6f 72 20 41 45 42 75 | 69 6c 64 41 70 70 6c 65 |for AEBu|ildApple|
|000048a0| 45 76 65 6e 74 3a 0d 0d | 65 76 65 6e 74 73 74 72 |Event:..|eventstr|
|000048b0| 69 6e 67 20 3a 3a 3d 09 | 65 76 74 6b 65 79 77 6f |ing ::=.|evtkeywo|
|000048c0| 72 64 6c 69 73 74 09 d1 | 54 6f 70 20 6c 65 76 65 |rdlist..|Top leve|
|000048d0| 6c 20 73 79 6e 74 61 78 | 20 66 6f 72 20 41 45 42 |l syntax| for AEB|
|000048e0| 75 69 6c 64 41 70 70 6c | 65 45 76 65 6e 74 0d 65 |uildAppl|eEvent.e|
|000048f0| 76 74 6b 65 79 77 6f 72 | 64 70 61 69 72 20 3a 3a |vtkeywor|dpair ::|
|00004900| 3d 09 5b 7e 5d 20 69 64 | 65 6e 74 20 3a 20 6f 62 |=.[~] id|ent : ob|
|00004910| 6a 09 d1 4b 65 79 77 6f | 72 64 2f 76 61 6c 75 65 |j..Keywo|rd/value|
|00004920| 20 70 61 69 72 0d 65 76 | 74 6b 65 79 77 6f 72 64 | pair.ev|tkeyword|
|00004930| 6c 69 73 74 20 3a 3a 3d | 09 c7 62 6c 61 6e 6b c8 |list ::=|..blank.|
|00004940| 09 d1 4c 69 73 74 20 6f | 66 20 73 61 69 64 20 70 |..List o|f said p|
|00004950| 61 69 72 73 0d 09 65 76 | 74 6b 65 79 77 6f 72 64 |airs..ev|tkeyword|
|00004960| 70 61 69 72 20 5b 20 2c | 20 65 76 74 6b 65 79 77 |pair [ ,| evtkeyw|
|00004970| 6f 72 64 70 61 69 72 20 | 5d 2a 0d 09 0d 54 68 65 |ordpair |]*...The|
|00004980| 72 65 2e 20 4e 6f 77 20 | 69 74 d5 73 20 61 6c 6c |re. Now |it.s all|
|00004990| 20 63 72 79 73 74 61 6c | 2d 63 6c 65 61 72 2c 20 | crystal|-clear, |
|000049a0| 72 69 67 68 74 3f 0d 0d | 41 6e 20 45 78 61 6d 70 |right?..|An Examp|
|000049b0| 6c 65 20 26 20 54 69 6d | 69 6e 67 20 43 6f 6d 70 |le & Tim|ing Comp|
|000049c0| 61 72 69 73 6f 6e 0d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |arison.-|--------|
|000049d0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |--------|--------|
|000049e0| 2d 2d 2d 2d 2d 0d 0d 41 | 73 20 61 6e 20 65 78 61 |-----..A|s an exa|
|000049f0| 6d 70 6c 65 2c 20 49 d5 | 6c 6c 20 74 61 6b 65 20 |mple, I.|ll take |
|00004a00| 61 20 43 20 66 75 6e 63 | 74 69 6f 6e 20 74 6f 20 |a C func|tion to |
|00004a10| 67 65 6e 65 72 61 74 65 | 20 61 6e 20 6f 62 6a 65 |generate| an obje|
|00004a20| 63 74 20 64 65 73 63 72 | 69 70 74 6f 72 20 28 74 |ct descr|iptor (t|
|00004a30| 61 6b 65 6e 20 66 72 6f | 6d 20 0d 61 20 50 61 73 |aken fro|m .a Pas|
|00004a40| 63 61 6c 20 65 78 61 6d | 70 6c 65 20 69 6e 20 74 |cal exam|ple in t|
|00004a50| 68 65 20 4f 62 6a 65 63 | 74 20 4d 6f 64 65 6c 20 |he Objec|t Model |
|00004a60| 45 52 53 2c 20 66 6c 65 | 73 68 65 64 20 6f 75 74 |ERS, fle|shed out|
|00004a70| 20 61 6e 64 20 77 69 74 | 68 20 67 6f 62 73 20 6f | and wit|h gobs o|
|00004a80| 66 20 65 72 72 6f 72 20 | 0d 63 68 65 63 6b 69 6e |f error |.checkin|
|00004a90| 67 20 61 64 64 65 64 29 | 20 61 6e 64 20 74 75 72 |g added)| and tur|
|00004aa0| 6e 20 69 74 20 69 6e 74 | 6f 20 61 20 63 61 6c 6c |n it int|o a call|
|00004ab0| 20 74 6f 20 41 45 42 75 | 69 6c 64 2e 20 54 68 65 | to AEBu|ild. The|
|00004ac0| 20 6f 62 6a 65 63 74 20 | 64 65 73 63 72 69 70 74 | object |descript|
|00004ad0| 6f 72 20 77 65 20 77 61 | 6e 74 20 0d 74 6f 20 67 |or we wa|nt .to g|
|00004ae0| 65 6e 65 72 61 74 65 20 | 69 73 3a 0d 0d 46 69 72 |enerate |is:..Fir|
|00004af0| 73 74 20 6c 69 6e 65 20 | 6f 66 20 64 6f 63 75 6d |st line |of docum|
|00004b00| 65 6e 74 20 27 53 70 69 | 6e 6e 61 6b 65 72 27 20 |ent 'Spi|nnaker' |
|00004b10| 77 68 6f 73 65 20 66 69 | 72 73 74 20 77 6f 72 64 |whose fi|rst word|
|00004b20| 20 69 73 20 27 41 70 72 | 69 6c 27 0d 61 6e 64 20 | is 'Apr|il'.and |
|00004b30| 77 68 6f 73 65 20 73 65 | 63 6f 6e 64 20 77 6f 72 |whose se|cond wor|
|00004b40| 64 20 69 73 20 27 69 73 | 27 0d 0d 54 68 65 6e 20 |d is 'is|'..Then |
|00004b50| 49 d5 6c 6c 20 65 78 65 | 63 75 74 65 20 62 6f 74 |I.ll exe|cute bot|
|00004b60| 68 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 6e 64 20 |h functi|ons and |
|00004b70| 63 6f 6d 70 61 72 65 20 | 74 68 65 69 72 20 65 78 |compare |their ex|
|00004b80| 65 63 75 74 69 6f 6e 20 | 74 69 6d 65 73 2e 0d 0d |ecution |times...|
|00004b90| 43 20 43 6f 64 65 20 55 | 73 69 6e 67 20 4f 62 6a |C Code U|sing Obj|
|00004ba0| 65 63 74 2d 50 61 63 6b | 69 6e 67 20 4c 69 62 72 |ect-Pack|ing Libr|
|00004bb0| 61 72 79 0d 0d 4f 53 45 | 72 72 0d 42 75 69 6c 64 |ary..OSE|rr.Build|
|00004bc0| 42 79 48 61 6e 64 28 20 | 41 45 44 65 73 63 20 2a |ByHand( |AEDesc *|
|00004bd0| 64 44 6f 63 75 6d 65 6e | 74 2c 20 41 45 44 65 73 |dDocumen|t, AEDes|
|00004be0| 63 20 2a 74 68 65 52 65 | 73 75 6c 74 4f 62 6a 20 |c *theRe|sultObj |
|00004bf0| 29 0d 7b 0d 09 4f 53 45 | 72 72 20 65 72 72 3b 0d |).{..OSE|rr err;.|
|00004c00| 09 41 45 44 65 73 63 20 | 64 4f 62 6a 65 63 74 45 |.AEDesc |dObjectE|
|00004c10| 78 61 6d 69 6e 65 64 2c | 20 64 4e 75 6d 2c 20 64 |xamined,| dNum, d|
|00004c20| 57 6f 72 64 31 2c 20 64 | 57 6f 72 64 32 2c 20 64 |Word1, d|Word2, d|
|00004c30| 41 70 72 69 6c 54 65 78 | 74 2c 20 64 49 73 54 65 |AprilTex|t, dIsTe|
|00004c40| 78 74 2c 0d 09 09 20 20 | 20 64 43 6f 6d 70 61 72 |xt,... | dCompar|
|00004c50| 69 73 6f 6e 31 2c 20 64 | 43 6f 6d 70 61 72 69 73 |ison1, d|Comparis|
|00004c60| 6f 6e 32 2c 20 64 4c 6f | 67 69 63 61 6c 54 65 72 |on2, dLo|gicalTer|
|00004c70| 6d 73 2c 20 64 54 68 65 | 54 65 73 74 2c 20 64 4c |ms, dThe|Test, dL|
|00004c80| 69 6e 65 4f 6e 65 2c 20 | 64 54 65 73 74 65 64 4c |ineOne, |dTestedL|
|00004c90| 69 6e 65 73 3b 0d 09 0d | 09 64 4f 62 6a 65 63 74 |ines;...|.dObject|
|00004ca0| 45 78 61 6d 69 6e 65 64 | 2e 64 61 74 61 48 61 6e |Examined|.dataHan|
|00004cb0| 64 6c 65 20 3d 09 2f 2a | 20 5a 65 72 6f 20 74 68 |dle =./*| Zero th|
|00004cc0| 69 6e 67 73 20 74 6f 20 | 73 74 61 72 74 20 6f 75 |ings to |start ou|
|00004cd0| 74 20 77 69 74 68 20 73 | 6f 20 77 65 20 63 61 6e |t with s|o we can|
|00004ce0| 20 73 61 66 65 6c 79 20 | 2a 2f 0d 09 09 64 4e 75 | safely |*/...dNu|
|00004cf0| 6d 2e 64 61 74 61 48 61 | 6e 64 6c 65 20 3d 09 09 |m.dataHa|ndle =..|
|00004d00| 09 09 2f 2a 20 65 78 65 | 63 75 74 65 20 6f 75 72 |../* exe|cute our|
|00004d10| 20 66 61 69 6c 20 63 6f | 64 65 20 69 66 20 74 68 | fail co|de if th|
|00004d20| 69 6e 67 73 20 64 6f 6e | 27 74 20 77 6f 72 6b 20 |ings don|'t work |
|00004d30| 6f 75 74 20 2a 2f 0d 09 | 09 64 57 6f 72 64 31 2e |out */..|.dWord1.|
|00004d40| 64 61 74 61 48 61 6e 64 | 6c 65 20 3d 0d 09 09 64 |dataHand|le =...d|
|00004d50| 57 6f 72 64 32 2e 64 61 | 74 61 48 61 6e 64 6c 65 |Word2.da|taHandle|
|00004d60| 20 3d 0d 09 09 64 41 70 | 72 69 6c 54 65 78 74 2e | =...dAp|rilText.|
|00004d70| 64 61 74 61 48 61 6e 64 | 6c 65 20 3d 0d 09 09 64 |dataHand|le =...d|
|00004d80| 49 73 54 65 78 74 2e 64 | 61 74 61 48 61 6e 64 6c |IsText.d|ataHandl|
|00004d90| 65 20 3d 0d 09 09 64 43 | 6f 6d 70 61 72 69 73 6f |e =...dC|ompariso|
|00004da0| 6e 31 2e 64 61 74 61 48 | 61 6e 64 6c 65 20 3d 0d |n1.dataH|andle =.|
|00004db0| 09 09 64 43 6f 6d 70 61 | 72 69 73 6f 6e 32 2e 64 |..dCompa|rison2.d|
|00004dc0| 61 74 61 48 61 6e 64 6c | 65 20 3d 0d 09 09 64 4c |ataHandl|e =...dL|
|00004dd0| 6f 67 69 63 61 6c 54 65 | 72 6d 73 2e 64 61 74 61 |ogicalTe|rms.data|
|00004de0| 48 61 6e 64 6c 65 20 3d | 0d 09 09 64 54 68 65 54 |Handle =|...dTheT|
|00004df0| 65 73 74 2e 64 61 74 61 | 48 61 6e 64 6c 65 20 3d |est.data|Handle =|
|00004e00| 0d 09 09 64 4c 69 6e 65 | 4f 6e 65 2e 64 61 74 61 |...dLine|One.data|
|00004e10| 48 61 6e 64 6c 65 20 3d | 0d 09 09 64 54 65 73 74 |Handle =|...dTest|
|00004e20| 65 64 4c 69 6e 65 73 2e | 64 61 74 61 48 61 6e 64 |edLines.|dataHand|
|00004e30| 6c 65 20 3d 0d 09 09 09 | 4e 49 4c 3b 0d 0d 09 69 |le =....|NIL;...i|
|00004e40| 66 28 20 65 72 72 3d 20 | 41 45 43 72 65 61 74 65 |f( err= |AECreate|
|00004e50| 44 65 73 63 28 20 27 65 | 78 6d 6e 27 2c 20 4e 49 |Desc( 'e|xmn', NI|
|00004e60| 4c 2c 20 30 2c 20 26 64 | 4f 62 6a 65 63 74 45 78 |L, 0, &d|ObjectEx|
|00004e70| 61 6d 69 6e 65 64 20 29 | 20 29 0d 09 09 67 6f 74 |amined )| )...got|
|00004e80| 6f 20 66 61 69 6c 3b 0d | 0d 09 69 66 28 20 65 72 |o fail;.|..if( er|
|00004e90| 72 3d 20 4d 61 6b 65 49 | 6e 64 65 78 44 65 73 63 |r= MakeI|ndexDesc|
|00004ea0| 72 69 70 74 6f 72 28 31 | 2c 26 64 4e 75 6d 29 20 |riptor(1|,&dNum) |
|00004eb0| 29 0d 09 09 67 6f 74 6f | 20 66 61 69 6c 3b 0d 09 |)...goto| fail;..|
|00004ec0| 69 66 28 20 65 72 72 3d | 20 4d 61 6b 65 4f 62 6a |if( err=| MakeObj|
|00004ed0| 44 65 73 63 72 69 70 74 | 6f 72 28 20 27 77 6f 72 |Descript|or( 'wor|
|00004ee0| 64 27 2c 20 26 64 4f 62 | 6a 65 63 74 45 78 61 6d |d', &dOb|jectExam|
|00004ef0| 69 6e 65 64 2c 20 66 6f | 72 6d 49 6e 64 65 78 2c |ined, fo|rmIndex,|
|00004f00| 20 26 64 4e 75 6d 2c 0d | 09 09 09 09 09 66 61 6c | &dNum,.|.....fal|
|00004f10| 73 65 2c 20 26 64 57 6f | 72 64 31 29 20 29 0d 09 |se, &dWo|rd1) )..|
|00004f20| 09 67 6f 74 6f 20 66 61 | 69 6c 3b 0d 09 69 66 28 |.goto fa|il;..if(|
|00004f30| 20 65 72 72 3d 20 41 45 | 43 72 65 61 74 65 44 65 | err= AE|CreateDe|
|00004f40| 73 63 28 20 27 54 45 58 | 54 27 2c 20 22 41 70 72 |sc( 'TEX|T', "Apr|
|00004f50| 69 6c 22 2c 20 35 2c 20 | 26 64 41 70 72 69 6c 54 |il", 5, |&dAprilT|
|00004f60| 65 78 74 20 29 20 29 0d | 09 09 67 6f 74 6f 20 66 |ext ) ).|..goto f|
|00004f70| 61 69 6c 3b 0d 0d 09 41 | 45 44 69 73 70 6f 73 65 |ail;...A|EDispose|
|00004f80| 44 65 73 63 28 26 64 4e | 75 6d 29 3b 0d 09 69 66 |Desc(&dN|um);..if|
|00004f90| 28 20 65 72 72 3d 20 4d | 61 6b 65 49 6e 64 65 78 |( err= M|akeIndex|
|00004fa0| 44 65 73 63 72 69 70 74 | 6f 72 28 32 2c 26 64 4e |Descript|or(2,&dN|
|00004fb0| 75 6d 29 20 29 0d 09 09 | 67 6f 74 6f 20 66 61 69 |um) )...|goto fai|
|00004fc0| 6c 3b 0d 09 69 66 28 20 | 65 72 72 3d 20 4d 61 6b |l;..if( |err= Mak|
|00004fd0| 65 4f 62 6a 44 65 73 63 | 72 69 70 74 6f 72 28 20 |eObjDesc|riptor( |
|00004fe0| 27 77 6f 72 64 27 2c 20 | 26 64 4f 62 6a 65 63 74 |'word', |&dObject|
|00004ff0| 45 78 61 6d 69 6e 65 64 | 2c 20 66 6f 72 6d 49 6e |Examined|, formIn|
|00005000| 64 65 78 2c 20 26 64 4e | 75 6d 2c 0d 09 09 09 09 |dex, &dN|um,.....|
|00005010| 09 74 72 75 65 2c 20 26 | 64 57 6f 72 64 32 29 20 |.true, &|dWord2) |
|00005020| 29 0d 09 09 67 6f 74 6f | 20 66 61 69 6c 3b 0d 09 |)...goto| fail;..|
|00005030| 69 66 28 20 65 72 72 3d | 20 41 45 43 72 65 61 74 |if( err=| AECreat|
|00005040| 65 44 65 73 63 28 20 27 | 54 45 58 54 27 2c 20 22 |eDesc( '|TEXT', "|
|00005050| 69 73 22 2c 20 32 2c 20 | 26 64 49 73 54 65 78 74 |is", 2, |&dIsText|
|00005060| 20 29 20 29 0d 09 09 67 | 6f 74 6f 20 66 61 69 6c | ) )...g|oto fail|
|00005070| 3b 0d 0d 09 69 66 28 20 | 65 72 72 3d 20 4d 61 6b |;...if( |err= Mak|
|00005080| 65 43 6f 6d 70 44 65 73 | 63 72 69 70 74 6f 72 28 |eCompDes|criptor(|
|00005090| 20 27 3d 20 20 20 27 2c | 20 26 64 41 70 72 69 6c | '= ',| &dApril|
|000050a0| 54 65 78 74 2c 20 26 64 | 57 6f 72 64 31 2c 20 74 |Text, &d|Word1, t|
|000050b0| 72 75 65 2c 20 26 64 43 | 6f 6d 70 61 72 69 73 6f |rue, &dC|ompariso|
|000050c0| 6e 31 20 29 20 29 0d 09 | 09 67 6f 74 6f 20 66 61 |n1 ) )..|.goto fa|
|000050d0| 69 6c 3b 0d 09 69 66 28 | 20 65 72 72 3d 20 4d 61 |il;..if(| err= Ma|
|000050e0| 6b 65 43 6f 6d 70 44 65 | 73 63 72 69 70 74 6f 72 |keCompDe|scriptor|
|000050f0| 28 20 27 3d 20 20 20 27 | 2c 20 26 64 49 73 54 65 |( '= '|, &dIsTe|
|00005100| 78 74 2c 09 20 20 26 64 | 57 6f 72 64 32 2c 20 74 |xt,. &d|Word2, t|
|00005110| 72 75 65 2c 20 26 64 43 | 6f 6d 70 61 72 69 73 6f |rue, &dC|ompariso|
|00005120| 6e 32 20 29 20 29 0d 09 | 09 67 6f 74 6f 20 66 61 |n2 ) )..|.goto fa|
|00005130| 69 6c 3b 0d 0d 09 69 66 | 28 20 65 72 72 3d 20 41 |il;...if|( err= A|
|00005140| 45 43 72 65 61 74 65 4c | 69 73 74 28 20 4e 49 4c |ECreateL|ist( NIL|
|00005150| 2c 20 30 2c 20 66 61 6c | 73 65 2c 20 26 64 4c 6f |, 0, fal|se, &dLo|
|00005160| 67 69 63 61 6c 54 65 72 | 6d 73 20 29 20 29 0d 09 |gicalTer|ms ) )..|
|00005170| 09 67 6f 74 6f 20 66 61 | 69 6c 3b 0d 09 69 66 28 |.goto fa|il;..if(|
|00005180| 20 65 72 72 3d 20 41 45 | 50 75 74 44 65 73 63 28 | err= AE|PutDesc(|
|00005190| 20 64 4c 6f 67 69 63 61 | 6c 54 65 72 6d 73 2c 20 | dLogica|lTerms, |
|000051a0| 31 2c 20 64 43 6f 6d 70 | 61 72 69 73 6f 6e 31 20 |1, dComp|arison1 |
|000051b0| 29 20 29 0d 09 09 67 6f | 74 6f 20 66 61 69 6c 3b |) )...go|to fail;|
|000051c0| 0d 09 69 66 28 20 65 72 | 72 3d 20 41 45 50 75 74 |..if( er|r= AEPut|
|000051d0| 44 65 73 63 28 20 64 4c | 6f 67 69 63 61 6c 54 65 |Desc( dL|ogicalTe|
|000051e0| 72 6d 73 2c 20 32 2c 20 | 64 43 6f 6d 70 61 72 69 |rms, 2, |dCompari|
|000051f0| 73 6f 6e 32 20 29 20 29 | 0d 09 09 67 6f 74 6f 20 |son2 ) )|...goto |
|00005200| 66 61 69 6c 3b 0d 09 09 | 0d 09 41 45 44 69 73 70 |fail;...|..AEDisp|
|00005210| 6f 73 65 44 65 73 63 28 | 26 64 43 6f 6d 70 61 72 |oseDesc(|&dCompar|
|00005220| 69 73 6f 6e 31 29 3b 0d | 09 41 45 44 69 73 70 6f |ison1);.|.AEDispo|
|00005230| 73 65 44 65 73 63 28 26 | 64 43 6f 6d 70 61 72 69 |seDesc(&|dCompari|
|00005240| 73 6f 6e 32 29 3b 0d 09 | 0d 09 69 66 28 20 65 72 |son2);..|..if( er|
|00005250| 72 3d 20 4d 61 6b 65 4c | 6f 67 69 63 61 6c 44 65 |r= MakeL|ogicalDe|
|00005260| 73 63 72 69 70 74 6f 72 | 28 20 26 64 4c 6f 67 69 |scriptor|( &dLogi|
|00005270| 63 61 6c 54 65 72 6d 73 | 2c 20 27 41 4e 44 20 27 |calTerms|, 'AND '|
|00005280| 2c 20 74 72 75 65 2c 20 | 26 64 54 68 65 54 65 73 |, true, |&dTheTes|
|00005290| 74 29 20 29 0d 09 09 67 | 6f 74 6f 20 66 61 69 6c |t) )...g|oto fail|
|000052a0| 3b 0d 09 0d 09 69 66 28 | 20 65 72 72 3d 20 4d 61 |;....if(| err= Ma|
|000052b0| 6b 65 4f 62 6a 44 65 73 | 63 72 69 70 74 6f 72 28 |keObjDes|criptor(|
|000052c0| 63 6c 61 73 73 4c 69 6e | 65 2c 26 64 44 6f 63 75 |classLin|e,&dDocu|
|000052d0| 6d 65 6e 74 2c 66 6f 72 | 6d 54 65 73 74 2c 26 64 |ment,for|mTest,&d|
|000052e0| 54 68 65 54 65 73 74 2c | 74 72 75 65 2c 0d 09 09 |TheTest,|true,...|
|000052f0| 09 09 09 09 09 09 09 26 | 64 54 65 73 74 65 64 4c |.......&|dTestedL|
|00005300| 69 6e 65 73 29 20 29 0d | 09 09 67 6f 74 6f 20 66 |ines) ).|..goto f|
|00005310| 61 69 6c 3b 0d 0d 09 69 | 66 28 20 65 72 72 3d 20 |ail;...i|f( err= |
|00005320| 4d 61 6b 65 49 6e 64 65 | 78 44 65 73 63 72 69 70 |MakeInde|xDescrip|
|00005330| 74 6f 72 28 31 2c 26 64 | 4c 69 6e 65 4f 6e 65 29 |tor(1,&d|LineOne)|
|00005340| 20 29 0d 09 09 67 6f 74 | 6f 20 66 61 69 6c 3b 0d | )...got|o fail;.|
|00005350| 09 69 66 28 20 65 72 72 | 3d 20 4d 61 6b 65 4f 62 |.if( err|= MakeOb|
|00005360| 6a 44 65 73 63 72 69 70 | 74 6f 72 28 20 63 6c 61 |jDescrip|tor( cla|
|00005370| 73 73 4c 69 6e 65 2c 20 | 26 64 54 65 73 74 65 64 |ssLine, |&dTested|
|00005380| 4c 69 6e 65 73 2c 20 66 | 6f 72 6d 49 6e 64 65 78 |Lines, f|ormIndex|
|00005390| 2c 20 26 64 4c 69 6e 65 | 4f 6e 65 2c 0d 09 09 09 |, &dLine|One,....|
|000053a0| 74 72 75 65 2c 20 74 68 | 65 52 65 73 75 6c 74 4f |true, th|eResultO|
|000053b0| 62 6a 20 29 20 29 0d 09 | 09 67 6f 74 6f 20 66 61 |bj ) )..|.goto fa|
|000053c0| 69 6c 3b 0d 09 72 65 74 | 75 72 6e 20 6e 6f 45 72 |il;..ret|urn noEr|
|000053d0| 72 3b 0d 09 0d 66 61 69 | 6c 3a 09 09 09 09 09 09 |r;...fai|l:......|
|000053e0| 09 09 09 09 09 2f 2a 20 | 43 6c 65 61 6e 20 75 70 |...../* |Clean up|
|000053f0| 20 69 6e 20 63 61 73 65 | 20 77 65 20 63 6f 75 6c | in case| we coul|
|00005400| 64 6e 27 74 20 62 75 69 | 6c 64 20 69 74 20 2a 2f |dn't bui|ld it */|
|00005410| 0d 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 28 |..AEDisp|oseDesc(|
|00005420| 74 68 65 52 65 73 75 6c | 74 4f 62 6a 29 3b 0d 09 |theResul|tObj);..|
|00005430| 41 45 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 64 |AEDispos|eDesc(&d|
|00005440| 4f 62 6a 65 63 74 45 78 | 61 6d 69 6e 65 64 29 3b |ObjectEx|amined);|
|00005450| 0d 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 28 |..AEDisp|oseDesc(|
|00005460| 26 64 4e 75 6d 29 3b 0d | 09 41 45 44 69 73 70 6f |&dNum);.|.AEDispo|
|00005470| 73 65 44 65 73 63 28 26 | 64 57 6f 72 64 31 29 3b |seDesc(&|dWord1);|
|00005480| 0d 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 28 |..AEDisp|oseDesc(|
|00005490| 26 64 57 6f 72 64 32 29 | 3b 0d 09 41 45 44 69 73 |&dWord2)|;..AEDis|
|000054a0| 70 6f 73 65 44 65 73 63 | 28 26 64 41 70 72 69 6c |poseDesc|(&dApril|
|000054b0| 54 65 78 74 29 3b 0d 09 | 41 45 44 69 73 70 6f 73 |Text);..|AEDispos|
|000054c0| 65 44 65 73 63 28 26 64 | 49 73 54 65 78 74 29 3b |eDesc(&d|IsText);|
|000054d0| 0d 09 41 45 44 69 73 70 | 6f 73 65 44 65 73 63 28 |..AEDisp|oseDesc(|
|000054e0| 26 64 43 6f 6d 70 61 72 | 69 73 6f 6e 31 29 3b 0d |&dCompar|ison1);.|
|000054f0| 09 41 45 44 69 73 70 6f | 73 65 44 65 73 63 28 26 |.AEDispo|seDesc(&|
|00005500| 64 43 6f 6d 70 61 72 69 | 73 6f 6e 32 29 3b 0d 09 |dCompari|son2);..|
|00005510| 41 45 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 64 |AEDispos|eDesc(&d|
|00005520| 4c 6f 67 69 63 61 6c 54 | 65 72 6d 73 29 3b 0d 09 |LogicalT|erms);..|
|00005530| 41 45 44 69 73 70 6f 73 | 65 44 65 73 63 28 26 64 |AEDispos|eDesc(&d|
|00005540| 54 68 65 54 65 73 74 29 | 3b 0d 09 41 45 44 69 73 |TheTest)|;..AEDis|
|00005550| 70 6f 73 65 44 65 73 63 | 28 26 64 4c 69 6e 65 4f |poseDesc|(&dLineO|
|00005560| 6e 65 29 3b 0d 09 41 45 | 44 69 73 70 6f 73 65 44 |ne);..AE|DisposeD|
|00005570| 65 73 63 28 26 64 54 65 | 73 74 65 64 4c 69 6e 65 |esc(&dTe|stedLine|
|00005580| 73 29 3b 0d 09 0d 09 72 | 65 74 75 72 6e 20 65 72 |s);....r|eturn er|
|00005590| 72 3b 0d 7d 0d 0d 4d 50 | 57 20 33 2e 32 62 35 20 |r;.}..MP|W 3.2b5 |
|000055a0| 43 20 63 6f 6d 70 69 6c | 65 64 20 74 68 69 73 20 |C compil|ed this |
|000055b0| 69 6e 74 6f 20 38 31 36 | 20 62 79 74 65 73 20 6f |into 816| bytes o|
|000055c0| 66 20 6f 62 6a 65 63 74 | 20 63 6f 64 65 2e 0d 49 |f object| code..I|
|000055d0| 20 66 6f 75 6e 64 20 74 | 68 61 74 20 74 68 65 20 | found t|hat the |
|000055e0| 61 76 65 72 61 67 65 20 | 74 69 6d 65 20 74 6f 20 |average |time to |
|000055f0| 65 78 65 63 75 74 65 20 | 74 68 69 73 20 66 75 6e |execute |this fun|
|00005600| 63 74 69 6f 6e 20 77 61 | 73 20 30 2e 30 31 38 38 |ction wa|s 0.0188|
|00005610| 20 73 65 63 6f 6e 64 73 | 20 0d 28 51 75 61 64 72 | seconds| .(Quadr|
|00005620| 61 20 37 30 30 29 20 6f | 72 20 30 2e 30 31 31 33 |a 700) o|r 0.0113|
|00005630| 20 73 65 63 6f 6e 64 73 | 20 28 49 49 66 78 29 2e | seconds| (IIfx).|
|00005640| a0 20 55 73 65 20 74 68 | 69 73 20 66 69 67 75 72 |. Use th|is figur|
|00005650| 65 20 66 6f 72 20 63 6f | 6d 70 61 72 69 73 6f 6e |e for co|mparison|
|00005660| 20 6f 6e 6c 79 3b 20 79 | 6f 75 72 20 0d 74 69 6d | only; y|our .tim|
|00005670| 65 73 20 6d 61 79 20 76 | 61 72 79 2e 20 54 68 65 |es may v|ary. The|
|00005680| 20 74 69 6d 69 6e 67 20 | 69 73 20 65 73 70 65 63 | timing |is espec|
|00005690| 69 61 6c 6c 79 20 64 65 | 70 65 6e 64 65 6e 74 20 |ially de|pendent |
|000056a0| 6f 6e 20 74 68 65 20 6e | 75 6d 62 65 72 20 6f 66 |on the n|umber of|
|000056b0| 20 62 6c 6f 63 6b 73 20 | 69 6e 20 0d 74 68 65 20 | blocks |in .the |
|000056c0| 68 65 61 70 2c 20 73 69 | 6e 63 65 20 73 6f 20 6d |heap, si|nce so m|
|000056d0| 61 6e 79 20 62 6c 6f 63 | 6b 20 61 6c 6c 6f 63 61 |any bloc|k alloca|
|000056e0| 74 69 6f 6e 73 20 61 6e | 64 20 64 69 73 70 6f 73 |tions an|d dispos|
|000056f0| 61 6c 73 20 61 72 65 20 | 68 61 70 70 65 6e 69 6e |als are |happenin|
|00005700| 67 2e 0d 0d 41 70 70 6c | 65 53 63 72 69 70 74 0d |g...Appl|eScript.|
|00005710| 0d 46 69 72 73 74 20 6c | 69 6e 65 20 6f 66 20 64 |.First l|ine of d|
|00005720| 6f 63 75 6d 65 6e 74 20 | 27 53 70 69 6e 6e 61 6b |ocument |'Spinnak|
|00005730| 65 72 27 20 77 68 6f 73 | 65 20 66 69 72 73 74 20 |er' whos|e first |
|00005740| 77 6f 72 64 20 69 73 20 | 27 41 70 72 69 6c 27 0d |word is |'April'.|
|00005750| 61 6e 64 20 77 68 6f 73 | 65 20 73 65 63 6f 6e 64 |and whos|e second|
|00005760| 20 77 6f 72 64 20 69 73 | 20 27 69 73 27 0d 0d 44 | word is| 'is'..D|
|00005770| 65 73 63 72 69 70 74 6f | 72 20 53 74 72 69 6e 67 |escripto|r String|
|00005780| 0d 0d 6f 62 6a 7b 20 77 | 61 6e 74 3a 74 79 70 65 |..obj{ w|ant:type|
|00005790| 28 27 6c 69 6e 65 27 29 | 2c 0d 20 20 20 20 20 66 |('line')|,. f|
|000057a0| 72 6f 6d 3a 20 6f 62 6a | 7b 20 77 61 6e 74 3a 20 |rom: obj|{ want: |
|000057b0| 74 79 70 65 28 27 6c 69 | 6e 65 27 29 2c 20 66 72 |type('li|ne'), fr|
|000057c0| 6f 6d 3a 20 40 2c 20 66 | 6f 72 6d 3a 20 27 74 65 |om: @, f|orm: 'te|
|000057d0| 73 74 27 2c 0d 20 20 20 | 20 20 20 20 20 20 20 20 |st',. | |
|000057e0| 20 20 20 20 20 73 65 6c | 64 3a 20 6c 6f 67 69 7b | sel|d: logi{|
|000057f0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005800| 20 20 20 20 20 20 20 20 | 20 20 20 20 74 65 72 6d | | term|
|00005810| 3a 20 5b 63 6f 6d 70 7b | 20 72 65 6c 6f 3a 3d 2c |: [comp{| relo:=,|
|00005820| 20 6f 62 6a 31 3a d2 41 | 70 72 69 6c d3 2c 0d 20 | obj1:.A|pril.,. |
|00005830| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005840| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005850| 20 20 20 20 20 20 20 6f | 62 6a 32 3a 6f 62 6a 7b | o|bj2:obj{|
|00005860| 20 77 61 6e 74 3a 74 79 | 70 65 28 27 77 6f 72 64 | want:ty|pe('word|
|00005870| 27 29 2c 20 66 72 6f 6d | 3a 65 78 6d 6e 28 29 2c |'), from|:exmn(),|
|00005880| 20 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00005890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058b0| 20 20 20 20 66 6f 72 6d | 3a 69 6e 64 78 2c 20 73 | form|:indx, s|
|000058c0| 65 6c 64 3a 31 20 7d 0d | 20 20 20 20 20 20 20 20 |eld:1 }.| |
|000058d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000058e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 7d 2c | | },|
|000058f0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00005900| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005910| 20 20 20 63 6f 6d 70 7b | 20 72 65 6c 6f 3a 3d 2c | comp{| relo:=,|
|00005920| 20 6f 62 6a 31 3a d2 69 | 73 d3 2c 0d 20 20 20 20 | obj1:.i|s.,. |
|00005930| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005950| 20 20 20 20 6f 62 6a 32 | 3a 6f 62 6a 7b 20 77 61 | obj2|:obj{ wa|
|00005960| 6e 74 3a 74 79 70 65 28 | 27 77 6f 72 64 27 29 2c |nt:type(|'word'),|
|00005970| 20 66 72 6f 6d 3a 65 78 | 6d 6e 28 29 2c 0d 20 20 | from:ex|mn(),. |
|00005980| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005990| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059b0| 66 6f 72 6d 3a 69 6e 64 | 78 2c 20 73 65 6c 64 3a |form:ind|x, seld:|
|000059c0| 32 20 7d 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |2 }. | |
|000059d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000059e0| 20 20 20 20 20 20 20 20 | 20 20 7d 0d 20 20 20 20 | | }. |
|000059f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005a00| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 5d 2c 0d | | ],.|
|00005a10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005a20| 20 20 20 20 20 20 20 20 | 20 20 20 6c 6f 67 63 3a | | logc:|
|00005a30| 41 4e 44 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |AND. | |
|00005a40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7d 0d 20 | | }. |
|00005a50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7d 2c 0d | | },.|
|00005a60| 20 20 20 20 20 66 6f 72 | 6d 3a 20 27 69 6e 64 78 | for|m: 'indx|
|00005a70| 27 2c 0d 20 20 20 20 20 | 73 65 6c 64 3a 20 31 0d |',. |seld: 1.|
|00005a80| 7d 0d 0d 41 45 42 75 69 | 6c 64 20 43 61 6c 6c 0d |}..AEBui|ld Call.|
|00005a90| 0d 63 68 61 72 20 64 65 | 73 63 72 69 70 74 6f 72 |.char de|scriptor|
|00005aa0| 5b 5d 20 3d 09 09 09 09 | 2f 2a 20 53 61 6d 65 20 |[] =....|/* Same |
|00005ab0| 64 65 73 63 72 69 70 74 | 6f 72 20 73 74 72 69 6e |descript|or strin|
|00005ac0| 67 20 61 73 20 61 62 6f | 76 65 2e 20 4e 6f 74 65 |g as abo|ve. Note|
|00005ad0| 20 63 6c 65 76 65 72 20 | 2a 2f 0d 22 6f 62 6a 7b | clever |*/."obj{|
|00005ae0| 20 77 61 6e 74 3a 74 79 | 70 65 28 27 6c 69 6e 65 | want:ty|pe('line|
|00005af0| 27 29 2c 22 09 09 2f 2a | 20 6d 65 74 68 6f 64 20 |'),"../*| method |
|00005b00| 75 73 65 64 20 74 6f 20 | 62 72 65 61 6b 20 73 74 |used to |break st|
|00005b10| 72 69 6e 67 20 61 63 72 | 6f 73 73 20 6c 69 6e 65 |ring acr|oss line|
|00005b20| 73 2e 20 2a 2f 0d 20 20 | 20 20 22 66 72 6f 6d 3a |s. */. | "from:|
|00005b30| 20 6f 62 6a 7b 20 77 61 | 6e 74 3a 20 74 79 70 65 | obj{ wa|nt: type|
|00005b40| 28 27 6c 69 6e 65 27 29 | 2c 20 66 72 6f 6d 3a 20 |('line')|, from: |
|00005b50| 40 2c 20 66 6f 72 6d 3a | 20 27 74 65 73 74 27 2c |@, form:| 'test',|
|00005b60| 22 09 09 2f 2a 20 4e 6f | 74 65 20 70 61 72 61 6d |"../* No|te param|
|00005b70| 65 74 65 72 20 68 65 72 | 65 20 2a 2f 0d 20 20 20 |eter her|e */. |
|00005b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 22 73 65 6c | | "sel|
|00005b90| 64 3a 20 6c 6f 67 69 7b | 22 0d 20 20 20 20 20 20 |d: logi{|". |
|00005ba0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005bb0| 20 20 20 20 22 74 65 72 | 6d 3a 20 5b 63 6f 6d 70 | "ter|m: [comp|
|00005bc0| 7b 20 72 65 6c 6f 3a 3d | 2c 20 6f 62 6a 31 3a d2 |{ relo:=|, obj1:.|
|00005bd0| 41 70 72 69 6c d3 2c 22 | 0d 20 20 20 20 20 20 20 |April.,"|. |
|00005be0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005bf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c00| 22 6f 62 6a 32 3a 22 0d | 20 20 20 20 20 20 20 20 |"obj2:".| |
|00005c10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c20| 20 20 20 20 20 22 6f 62 | 6a 7b 20 77 61 6e 74 3a | "ob|j{ want:|
|00005c30| 74 79 70 65 28 27 77 6f | 72 64 27 29 2c 20 66 72 |type('wo|rd'), fr|
|00005c40| 6f 6d 3a 65 78 6d 6e 28 | 29 2c 20 66 6f 72 6d 3a |om:exmn(|), form:|
|00005c50| 69 6e 64 78 2c 20 73 65 | 6c 64 3a 31 20 7d 7d 2c |indx, se|ld:1 }},|
|00005c60| 22 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |". | |
|00005c70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005c80| 20 20 20 22 63 6f 6d 70 | 7b 20 72 65 6c 6f 3a 3d | "comp|{ relo:=|
|00005c90| 2c 20 6f 62 6a 31 3a d2 | 69 73 d3 2c 22 0d 20 20 |, obj1:.|is.,". |
|00005ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005cb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005cc0| 20 20 20 20 20 22 6f 62 | 6a 32 3a 22 0d 20 20 20 | "ob|j2:". |
|00005cd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005ce0| 20 20 20 20 20 20 20 20 | 20 20 22 6f 62 6a 7b 20 | | "obj{ |
|00005cf0| 77 61 6e 74 3a 74 79 70 | 65 28 27 77 6f 72 64 27 |want:typ|e('word'|
|00005d00| 29 2c 20 66 72 6f 6d 3a | 65 78 6d 6e 28 29 2c 20 |), from:|exmn(), |
|00005d10| 66 6f 72 6d 3a 69 6e 64 | 78 2c 20 73 65 6c 64 3a |form:ind|x, seld:|
|00005d20| 32 20 7d 7d 22 0d 20 20 | 20 20 20 20 20 20 20 20 |2 }}". | |
|00005d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d40| 20 20 20 20 20 20 22 5d | 2c 22 0d 20 20 20 20 20 | "]|,". |
|00005d50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d60| 20 20 20 20 20 22 6c 6f | 67 63 3a 41 4e 44 22 0d | "lo|gc:AND".|
|00005d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00005d80| 20 20 20 20 20 20 20 20 | 22 7d 22 0d 20 20 20 20 | |"}". |
|00005d90| 20 20 20 20 20 20 20 20 | 20 22 7d 2c 22 0d 20 20 | | "},". |
|00005da0| 20 20 22 66 6f 72 6d 3a | 20 27 69 6e 64 78 27 2c | "form:| 'indx',|
|00005db0| 22 0d 20 20 20 20 22 73 | 65 6c 64 3a 20 31 22 0d |". "s|eld: 1".|
|00005dc0| 22 7d 22 3b 0d 0d 76 6f | 69 64 20 50 61 63 6b 57 |"}";..vo|id PackW|
|00005dd0| 6f 72 64 44 65 73 63 28 | 20 41 45 44 65 73 63 20 |ordDesc(| AEDesc |
|00005de0| 2a 64 44 6f 63 75 6d 65 | 6e 74 4f 62 6a 65 63 74 |*dDocume|ntObject|
|00005df0| 20 29 09 2f 2a 20 d2 53 | 70 69 6e 6e 61 6b 65 72 | )./* .S|pinnaker|
|00005e00| d3 20 64 65 73 63 72 69 | 70 74 6f 72 20 69 73 20 |. descri|ptor is |
|00005e10| 61 20 70 61 72 61 6d 65 | 74 65 72 20 2a 2f 0d 7b |a parame|ter */.{|
|00005e20| 0d 09 65 72 72 20 3d 20 | 41 45 42 75 69 6c 64 28 |..err = |AEBuild(|
|00005e30| 26 74 68 65 52 65 73 75 | 6c 74 4f 62 6a 2c 0d 09 |&theResu|ltObj,..|
|00005e40| 09 09 09 09 64 65 73 63 | 72 69 70 74 6f 72 53 74 |....desc|riptorSt|
|00005e50| 72 69 6e 67 2c 0d 09 09 | 09 09 09 64 44 6f 63 75 |ring,...|...dDocu|
|00005e60| 6d 65 6e 74 4f 62 6a 65 | 63 74 29 3b 09 09 09 09 |mentObje|ct);....|
|00005e70| 09 2f 2a 20 41 45 44 65 | 73 63 2a 20 70 61 72 61 |./* AEDe|sc* para|
|00005e80| 6d 65 74 65 72 20 66 6f | 72 20 22 40 22 20 2a 2f |meter fo|r "@" */|
|00005e90| 0d 7d 0d 0d 4d 50 57 20 | 33 2e 32 62 35 20 43 20 |.}..MPW |3.2b5 C |
|00005ea0| 63 6f 6d 70 69 6c 65 64 | 20 74 68 69 73 20 69 6e |compiled| this in|
|00005eb0| 74 6f 20 34 32 20 62 79 | 74 65 73 20 6f 66 20 6f |to 42 by|tes of o|
|00005ec0| 62 6a 65 63 74 20 63 6f | 64 65 2c 20 70 6c 75 73 |bject co|de, plus|
|00005ed0| 20 33 31 30 20 62 79 74 | 65 73 20 6f 66 20 64 61 | 310 byt|es of da|
|00005ee0| 74 61 20 0d 73 74 6f 72 | 61 67 65 20 66 6f 72 20 |ta .stor|age for |
|00005ef0| 74 68 65 20 73 74 72 69 | 6e 67 2e 0d 0d 49 20 66 |the stri|ng...I f|
|00005f00| 6f 75 6e 64 20 74 68 61 | 74 20 74 68 65 20 61 76 |ound tha|t the av|
|00005f10| 65 72 61 67 65 20 74 69 | 6d 65 20 74 6f 20 65 78 |erage ti|me to ex|
|00005f20| 65 63 75 74 65 20 74 68 | 69 73 20 66 75 6e 63 74 |ecute th|is funct|
|00005f30| 69 6f 6e 20 77 61 73 20 | 30 2e 30 30 34 39 20 73 |ion was |0.0049 s|
|00005f40| 65 63 6f 6e 64 73 20 0d | 28 51 75 61 64 72 61 20 |econds .|(Quadra |
|00005f50| 37 30 30 29 20 6f 72 20 | 30 2e 30 30 37 30 20 73 |700) or |0.0070 s|
|00005f60| 65 63 6f 6e 64 73 20 28 | 49 49 66 78 29 2e 20 55 |econds (|IIfx). U|
|00005f70| 73 65 20 74 68 69 73 20 | 66 69 67 75 72 65 20 66 |se this |figure f|
|00005f80| 6f 72 20 63 6f 6d 70 61 | 72 69 73 6f 6e 20 6f 6e |or compa|rison on|
|00005f90| 6c 79 3b 20 79 6f 75 72 | 20 0d 74 69 6d 65 73 20 |ly; your| .times |
|00005fa0| 6d 61 79 20 76 61 72 79 | 2e 20 54 68 65 20 74 69 |may vary|. The ti|
|00005fb0| 6d 69 6e 67 20 69 73 20 | 64 65 70 65 6e 64 65 6e |ming is |dependen|
|00005fc0| 74 20 6f 6e 20 74 68 65 | 20 6e 75 6d 62 65 72 20 |t on the| number |
|00005fd0| 6f 66 20 62 6c 6f 63 6b | 73 20 69 6e 20 74 68 65 |of block|s in the|
|00005fe0| 20 68 65 61 70 2c 20 0d | 73 69 6e 63 65 20 68 65 | heap, .|since he|
|00005ff0| 61 70 20 62 6c 6f 63 6b | 73 20 61 72 65 20 62 65 |ap block|s are be|
|00006000| 69 6e 67 20 61 6c 6c 6f | 63 61 74 65 64 20 61 6e |ing allo|cated an|
|00006010| 64 20 72 65 73 69 7a 65 | 64 2e 0d 0d 54 69 6d 69 |d resize|d...Timi|
|00006020| 6e 67 20 43 6f 6e 63 6c | 75 73 69 6f 6e 73 0d 0d |ng Concl|usions..|
|00006030| 57 69 74 68 20 70 72 65 | 76 69 6f 75 73 20 76 65 |With pre|vious ve|
|00006040| 72 73 69 6f 6e 73 20 6f | 66 20 74 68 69 73 20 6c |rsions o|f this l|
|00006050| 69 62 72 61 72 79 2c 20 | 74 68 65 72 65 20 77 61 |ibrary, |there wa|
|00006060| 73 20 61 20 37 30 25 20 | 69 6e 63 72 65 61 73 65 |s a 70% |increase|
|00006070| 20 69 6e 20 65 78 65 63 | 75 74 69 6f 6e 20 74 69 | in exec|ution ti|
|00006080| 6d 65 20 0d 77 68 65 6e | 20 75 73 69 6e 67 20 74 |me .when| using t|
|00006090| 68 65 20 41 45 42 75 69 | 6c 64 20 72 6f 75 74 69 |he AEBui|ld routi|
|000060a0| 6e 65 2e 20 41 66 74 65 | 72 20 64 65 6c 69 76 65 |ne. Afte|r delive|
|000060b0| 72 69 6e 67 20 74 68 65 | 20 62 61 64 20 6e 65 77 |ring the| bad new|
|000060c0| 73 2c 20 49 20 77 72 6f | 74 65 3a 0d 48 6f 77 65 |s, I wro|te:.Howe|
|000060d0| 76 65 72 2c 20 69 66 20 | 73 70 65 65 64 20 64 6f |ver, if |speed do|
|000060e0| 65 73 20 62 65 63 6f 6d | 65 20 61 6e 20 69 73 73 |es becom|e an iss|
|000060f0| 75 65 2c 20 74 68 65 72 | 65 20 69 73 20 61 6c 77 |ue, ther|e is alw|
|00006100| 61 79 73 20 74 68 65 20 | 6f 70 74 69 6f 6e 20 6f |ays the |option o|
|00006110| 66 20 0d 74 75 72 62 6f | 63 68 61 72 67 69 6e 67 |f .turbo|charging|
|00006120| 20 41 45 42 75 69 6c 64 | 20 62 79 20 68 61 76 69 | AEBuild| by havi|
|00006130| 6e 67 20 69 74 20 64 69 | 72 65 63 74 6c 79 20 62 |ng it di|rectly b|
|00006140| 75 69 6c 64 20 64 65 73 | 63 72 69 70 74 6f 72 73 |uild des|criptors|
|00006150| 20 77 69 74 68 6f 75 74 | 20 67 6f 69 6e 67 20 0d | without| going .|
|00006160| 74 68 72 6f 75 67 68 20 | 74 68 65 20 41 70 70 6c |through |the Appl|
|00006170| 65 20 45 76 65 6e 74 20 | 4d 61 6e 61 67 65 72 20 |e Event |Manager |
|00006180| 66 75 6e 63 74 69 6f 6e | 73 20 61 74 20 61 6c 6c |function|s at all|
|00006190| 2e 20 54 68 69 73 20 77 | 6f 75 6c 64 20 73 61 76 |. This w|ould sav|
|000061a0| 65 20 61 6e 20 69 6e 63 | 72 65 64 69 62 6c 65 20 |e an inc|redible |
|000061b0| 0d 6e 75 6d 62 65 72 20 | 6f 66 20 4d 65 6d 6f 72 |.number |of Memor|
|000061c0| 79 20 4d 61 6e 61 67 65 | 72 20 63 61 6c 6c 73 20 |y Manage|r calls |
|000061d0| 61 6e 64 20 70 72 6f 62 | 61 62 6c 79 20 69 6e 63 |and prob|ably inc|
|000061e0| 72 65 61 73 65 20 70 65 | 72 66 6f 72 6d 61 6e 63 |rease pe|rformanc|
|000061f0| 65 20 0d 73 65 76 65 72 | 61 6c 66 6f 6c 64 2e 20 |e .sever|alfold. |
|00006200| 41 6e 79 6f 6e 65 20 75 | 73 69 6e 67 20 41 45 42 |Anyone u|sing AEB|
|00006210| 75 69 6c 64 20 77 69 6c | 6c 20 67 65 74 20 61 6c |uild wil|l get al|
|00006220| 6c 20 74 68 65 73 65 20 | 69 6d 70 72 6f 76 65 6d |l these |improvem|
|00006230| 65 6e 74 73 20 66 6f 72 | 20 66 72 65 65 2e 0d 54 |ents for| free..T|
|00006240| 68 69 73 20 69 73 20 65 | 78 61 63 74 6c 79 20 77 |his is e|xactly w|
|00006250| 68 61 74 20 49 20 64 69 | 64 20 69 6e 20 76 65 72 |hat I di|d in ver|
|00006260| 73 69 6f 6e 20 31 2e 31 | 2e 20 49 6e 20 66 61 63 |sion 1.1|. In fac|
|00006270| 74 2c 20 49 20 77 72 6f | 74 65 20 61 20 6c 69 62 |t, I wro|te a lib|
|00006280| 72 61 72 79 20 28 41 45 | 53 74 72 65 61 6d 29 20 |rary (AE|Stream) |
|00006290| 74 6f 20 0d 64 6f 20 69 | 74 2c 20 73 6f 20 79 6f |to .do i|t, so yo|
|000062a0| 75 20 63 61 6e 20 64 6f | 20 69 74 20 74 6f 6f 2e |u can do| it too.|
|000062b0| 20 49 74 d5 73 20 65 61 | 73 79 2e 0d 41 45 42 75 | It.s ea|sy..AEBu|
|000062c0| 69 6c 64 20 69 73 20 6e | 6f 77 20 31 2e 35 20 74 |ild is n|ow 1.5 t|
|000062d0| 6f 20 34 20 74 69 6d 65 | 73 20 61 73 20 66 61 73 |o 4 time|s as fas|
|000062e0| 74 20 28 64 65 70 65 6e | 64 69 6e 67 20 6f 6e 20 |t (depen|ding on |
|000062f0| 43 50 55 29 20 61 73 20 | 74 68 65 20 75 73 69 6e |CPU) as |the usin|
|00006300| 67 20 74 68 65 20 41 70 | 70 6c 65 20 0d 45 76 65 |g the Ap|ple .Eve|
|00006310| 6e 74 20 4d 61 6e 61 67 | 65 72 20 61 6e 64 2f 6f |nt Manag|er and/o|
|00006320| 72 20 4f 62 6a 65 63 74 | 20 50 61 63 6b 69 6e 67 |r Object| Packing|
|00006330| 20 4c 69 62 72 61 72 79 | 20 72 6f 75 74 69 6e 65 | Library| routine|
|00006340| 73 2e 20 28 54 68 69 73 | 20 6d 65 61 6e 73 20 74 |s. (This| means t|
|00006350| 68 61 74 20 0d 41 45 53 | 74 72 65 61 6d 20 77 61 |hat .AES|tream wa|
|00006360| 73 20 72 65 73 70 6f 6e | 73 69 62 6c 65 20 66 6f |s respon|sible fo|
|00006370| 72 20 61 20 74 68 72 65 | 65 66 6f 6c 64 20 73 70 |r a thre|efold sp|
|00006380| 65 65 64 2d 75 70 20 69 | 6e 20 41 45 42 75 69 6c |eed-up i|n AEBuil|
|00006390| 64 2e 20 4e 6f 74 20 62 | 61 64 2c 20 77 68 65 6e |d. Not b|ad, when|
|000063a0| 20 0d 79 6f 75 20 74 61 | 6b 65 20 69 6e 74 6f 20 | .you ta|ke into |
|000063b0| 61 63 63 6f 75 6e 74 20 | 6f 74 68 65 72 20 6f 76 |account |other ov|
|000063c0| 65 72 68 65 61 64 20 6c | 69 6b 65 20 70 61 72 73 |erhead l|ike pars|
|000063d0| 69 6e 67 20 74 68 65 20 | 66 6f 72 6d 61 74 20 73 |ing the |format s|
|000063e0| 74 72 69 6e 67 21 29 0d | 4e 65 65 64 6c 65 73 73 |tring!).|Needless|
|000063f0| 20 74 6f 20 73 61 79 2c | 20 69 66 20 79 6f 75 20 | to say,| if you |
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.